From 84d4441212b6236ef2b4c41db68ca4675e953a78 Mon Sep 17 00:00:00 2001 From: aawsome <37850842+aawsome@users.noreply.github.com> Date: Sun, 26 Nov 2023 20:21:10 +0100 Subject: [PATCH 1/4] Update deduplication.md --- src/commands/misc/deduplication.md | 33 ++++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/commands/misc/deduplication.md b/src/commands/misc/deduplication.md index b45dfec..230f1da 100644 --- a/src/commands/misc/deduplication.md +++ b/src/commands/misc/deduplication.md @@ -1,20 +1,27 @@ # Ensuring deduplication for copied snapshots -Even though the copy command can transfer snapshots between arbitrary -repositories, deduplication between snapshots from the source and destination -repository may not work. To ensure proper deduplication, both repositories have -to use the same parameters for splitting large files into smaller chunks, which -requires additional setup steps. With the same parameters rustic will for both -repositories split identical files into identical chunks and therefore -deduplication also works for snapshots copied between these repositories. +Different repositories usually have different parameters for splitting +larger files into smaller chunks. When copying snapshots between +arbitrary repository, deduplication between snapshots from the source +and destination repository doesn't work unless the repositories share +the same parameters, the so-called chunker parameters. -The chunker parameters are generated once when creating a new (destination) -repository. That is for a copy destination repository we have to instruct rustic -to initialize it using the same chunker parameters as the source repository: +Rustic enforces identical chunker parameters - if you try to copy to a +repository with different chunker parameter, you get an error like +```console +cannot copy to repository with different chunker parameter (re-chunking not implemented)! +``` + +Note: Currently it is not possible to change the chunker parameters of +existing repositories (re-chunking is not yet implemented). +To create a repository with identical chunker parameters to a source +repository, don't initialize the target repository, but instead run +the first `copy` command with the `--init` option. +This option initializes non-existing repositories with the correct +chunker parameter: ```console -rustic -r /srv/rustic-repo-copy init --repo2 /srv/rustic-repo --copy-chunker-params +rustic copy --init [SNAPSHOTS] ``` -Note that it is not possible to change the chunker parameters of an existing -repository. +Note: The target repositories must be defined in the config file. From 24611a4a36cea78d6885fe00c56a8a44b10047c8 Mon Sep 17 00:00:00 2001 From: aawsome <37850842+aawsome@users.noreply.github.com> Date: Sun, 26 Nov 2023 20:27:37 +0100 Subject: [PATCH 2/4] Update deduplication.md --- src/commands/misc/deduplication.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/commands/misc/deduplication.md b/src/commands/misc/deduplication.md index 230f1da..d72333c 100644 --- a/src/commands/misc/deduplication.md +++ b/src/commands/misc/deduplication.md @@ -1,24 +1,25 @@ # Ensuring deduplication for copied snapshots -Different repositories usually have different parameters for splitting -larger files into smaller chunks. When copying snapshots between -arbitrary repository, deduplication between snapshots from the source -and destination repository doesn't work unless the repositories share -the same parameters, the so-called chunker parameters. +Different repositories usually have different parameters for splitting larger +files into smaller chunks. When copying snapshots between arbitrary repository, +deduplication between snapshots from the source and destination repository +doesn't work unless the repositories share the same parameters, the so-called +chunker parameters. Rustic enforces identical chunker parameters - if you try to copy to a repository with different chunker parameter, you get an error like + ```console cannot copy to repository with different chunker parameter (re-chunking not implemented)! ``` -Note: Currently it is not possible to change the chunker parameters of -existing repositories (re-chunking is not yet implemented). +Note: Currently it is not possible to change the chunker parameters of existing +repositories (re-chunking is not yet implemented). -To create a repository with identical chunker parameters to a source -repository, don't initialize the target repository, but instead run -the first `copy` command with the `--init` option. -This option initializes non-existing repositories with the correct +To create a repository with identical chunker parameters to a source repository, +don't initialize the target repository, but instead run the first `copy` command +with the `--init` option. This option initializes non-existing repositories with +the correct chunker parameter: ```console rustic copy --init [SNAPSHOTS] From 44e8a4743d8ed0dec50bcf363a9bf33e7cdab2fb Mon Sep 17 00:00:00 2001 From: aawsome <37850842+aawsome@users.noreply.github.com> Date: Sun, 26 Nov 2023 20:28:50 +0100 Subject: [PATCH 3/4] Update deduplication.md --- src/commands/misc/deduplication.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/misc/deduplication.md b/src/commands/misc/deduplication.md index d72333c..e5b1017 100644 --- a/src/commands/misc/deduplication.md +++ b/src/commands/misc/deduplication.md @@ -19,8 +19,7 @@ repositories (re-chunking is not yet implemented). To create a repository with identical chunker parameters to a source repository, don't initialize the target repository, but instead run the first `copy` command with the `--init` option. This option initializes non-existing repositories with -the correct -chunker parameter: +the correct chunker parameter: ```console rustic copy --init [SNAPSHOTS] ``` From 570c7934a0321dd3c281d8225c3d49e082c8ee0d Mon Sep 17 00:00:00 2001 From: aawsome <37850842+aawsome@users.noreply.github.com> Date: Sun, 26 Nov 2023 20:29:56 +0100 Subject: [PATCH 4/4] Update deduplication.md --- src/commands/misc/deduplication.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands/misc/deduplication.md b/src/commands/misc/deduplication.md index e5b1017..0efa886 100644 --- a/src/commands/misc/deduplication.md +++ b/src/commands/misc/deduplication.md @@ -20,6 +20,7 @@ To create a repository with identical chunker parameters to a source repository, don't initialize the target repository, but instead run the first `copy` command with the `--init` option. This option initializes non-existing repositories with the correct chunker parameter: + ```console rustic copy --init [SNAPSHOTS] ```