-
Notifications
You must be signed in to change notification settings - Fork 340
The add
command connects another storage to the current repository.
Like the init
command, if the storage has not been initialized before a storage configuration file derived from the command line options will be created.
If the add
-ed storage has already been initialised before, then the command line options will be ignored and existing options are used.
Click here for a list of related forum topics.
SYNOPSIS:
duplicacy add - Add an additional storage to be used for the existing repository
USAGE:
duplicacy add [command options] <storage name> <snapshot id> <storage url>
OPTIONS:
-encrypt, -e encrypt the storage with a password
-chunk-size, -c <size> the average size of chunks (default is 4M)
-max-chunk-size, -max <size> the maximum size of chunks (default is chunk-size*4)
-min-chunk-size, -min <size> the minimum size of chunks (default is chunk-size/4)
-zstd-level <level> set zstd compression level (fastest, default, better, or best)
-zstd short for -zstd-level default
-iterations <i> the number of iterations used in storage key derivation (default is 16384)
-copy <storage name> make the new storage compatible with an existing one to allow for copy operations
-bit-identical (when using -copy) make the new storage bit-identical to also allow rsync etc.
-repository <path> specify the path of the repository (instead of the current working directory)
-key <public key> the RSA public key to encrypt file chunks
duplicacy add [command options] <storage name> <snapshot id> <storage url>
Add an encrypted webdav storage with the name webdav-storage
, the path webdav://username@server//path/to/storage
, the snapshot name my-documents-snap
and copy all settings from the existing default
storage.
duplicacy add -e -copy default -bit-identical webdav-storage my-documents-snap webdav://username@server//path/to/storage
The average size of a chunk.
duplicacy add -c 4M # the average chunk size is 4MB
The maximum size of a chunk.
duplicacy add -max 16M # the maximum chunk size is 16MB
The minimum size of a chunk.
duplicacy add -min 1M # the minimumchunk size is 1MB
The -iterations
option specifies how many iterations are used to generate the key that encrypts the config
file from the storage password.
The -copy
option is required if later you want to copy snapshots between this storage and another storage.
Two different storage are copy-compatible if they have the same chunk size
, the same maximum chunk size
, the same minimum chunk size
, the same chunk seed
(used in calculating the rolling hash in the variable-size chunks algorithm), and the same hash key
.
If the -copy
option is specified, these parameters will be copied from the existing storage rather than from the command line.
The -bit-identical
option is used along with the -copy
option and will copy the IDKey
, ChunkKey
and FileKey
to the new storage from the old one. In this case the names of the chunks generated by Duplicacy during backup will be identical in the source and new storage.
This has the effect that you can rsync or rclone the chunks
folder for example from local (source) to Google Drive (new storage), and then only do backups on Google Drive, and the existing chunks will be identical (same name, same size) as if the backup was run locally.
The -bit-identical
option does not copy the encryption option. It is possible to have an encrypted source and an unencrypted new storage, or vice versa. The -e
option determines whether or not the new storage will be encrypted.
This means of course, that the added storage can have a different password from the source.
duplicacy add -copy default -bit-identical
The -key
option enables RSA encryption.
💡 Each storage name must be unique in order to distinguish it from other storage.
Please note that when the -bit-identical
option is used to make a new encrypted storage compatible with an unencrypted one, it is possible to replace the new config
file with the standard config
file (which contains keys with standard values) and the new storage will become unencrypted. Therefore, the -bit-identical
option should never be used to copy the config
file for a new encrypted storage from an unencrypted storage.