From dc9a464deaf602dd040dbd22aec5f41aeb9400e9 Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Mon, 9 Mar 2026 06:23:28 +0100 Subject: [PATCH] document init-hot --- src/commands/init/cold_storage.md | 38 +++++++++++++++++++++++++++++++ src/comparison-restic.md | 22 ++++++++++-------- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/src/commands/init/cold_storage.md b/src/commands/init/cold_storage.md index c14b5c0..40eb0fa 100644 --- a/src/commands/init/cold_storage.md +++ b/src/commands/init/cold_storage.md @@ -205,3 +205,41 @@ only pack files older than the given time will be removed. Once you get a working configuration, please share it [in the main repository](https://github.com/rustic-rs/rustic/tree/main/config/services) so other users can use it as well! + +### changing a normal repository into a hot/cold repository + +Note: When changing a normal repository into a hot/cold repository, rustic uses +the normal repository as cold part; we therefore need to create the hot +repository part. This involves copying metadata from the normal repository to +the hot repository part. It is advised to do this before the cold part is +actually freezed, e.g. by changing storage tier or moving it to a cold location. + +Here are the steps: + +- Add a `repo-hot` configuration. +- Run `rustic init --hot-only`. This will copy over all metadata to the hot + repository part. +- Note that after these two steps, you already have a valid hot/cold repository + configuration where the cold part is not read by standard rustic commands. Try + it out by e.g. running `rustic check`! +- Manually freeze the complete cold repository part or copy it to another (cold) + storage (this may need to update the repository configuration). +- Add a suitable warm-up configuration. + +### changing a hot/cold repository into a normal repository + +This is rather simple, as the cold part of the repository already is a normal +repository which only needs to be warmed up. Here are the steps: + +- Remove any warm-up configuration. +- Manually warm-up the complete cold repository part or copy it to another (hot) + storage (this may need to update the repository configuration). +- Note that after these first two steps, you still have a totally valid hot/cold + repository configuration. The "cold" part is not cold anymore, but will not be + read by standard rustic commands. You can test this e.g. by running + `rustic check`. +- Remove `repo-hot` and the according configuration from the repository + configuration. +- (optional) Remove the hot repository from its storage backend. + +That's it! rustic will use the fully warmed-up repsitory as a normal repository. diff --git a/src/comparison-restic.md b/src/comparison-restic.md index afdcc17..999a568 100644 --- a/src/comparison-restic.md +++ b/src/comparison-restic.md @@ -9,7 +9,7 @@ rustic and restic. Currently, we compare restic 0.18.1 with rustic 0.11.0. | --------------------- | ------------------------- | ------------------------------------------------------ | | programming language | Go | Rust | | development philosopy | conservative with changes | moving fast, add new features early | -| test coverage | ✅ | ❌ (47% in rustic_core) | +| test coverage | ✅ | ❌ (52% in rustic_core) | | available as library | ❌ | ✅ [rustic_core](https://crates.io/crates/rustic_core) | ## Core features introduced by rustic @@ -41,6 +41,7 @@ introduced by rustic. Some have been already adopted by restic. | `backup` multiple snapshots at once | ❌ | ✅ | | `backup` support for block devices | ❌ | ✅ | | `check` uses existing cache | ❌ (roadmap: 0.19) | ✅ | +| `check` only given snapshot(s) | ❌ | ✅ | | show file history | ❌ | ✅ (`rustic find --path`) | | more snapshot filter options | ❌ | ✅ (see below for details) | | allow to log to file | ❌ | ✅ | @@ -206,15 +207,16 @@ introduced by rustic. Some have been already adopted by restic. ### `init` -| option | `restic` | `rustic` | -| ----------------------- | ------------------------------ | -------------------------------- | -| `--copy-chunker-params` | ✅ | (not needed, use `copy --init`) | -| `--from-*` | ✅ | (not needed, see `copy` command) | -| `--hostname` | ❌ (always sets hostname) | ✅ | -| `--repository-version` | ✅ | ✅ (use `--set-version`) | -| `--set-*` | ❌ (no in-repo config support) | ✅ | -| `--username` | ❌ (always sets username) | ✅ | -| `--with-created` | ❌ (always sets creation time) | ✅ | +| option | `restic` | `rustic` | +| ----------------------- | -------------------------------- | -------------------------------- | +| `--copy-chunker-params` | ✅ | (not needed, use `copy --init`) | +| `--from-*` | ✅ | (not needed, see `copy` command) | +| `--hostname` | ❌ (always sets hostname) | ✅ | +| `--hot-only` | ❌ (no general hot/cold support) | ✅ | +| `--repository-version` | ✅ | ✅ (use `--set-version`) | +| `--set-*` | ❌ (no in-repo config support) | ✅ | +| `--username` | ❌ (always sets username) | ✅ | +| `--with-created` | ❌ (always sets creation time) | ✅ | ### `backup`