Restore command details

   duplicacy restore - Restore the repository to a previously saved snapshot

   duplicacy restore [command options] [--] [pattern] ...

   -r <revision>            the revision number of the snapshot (required)
   -hash                    detect file differences by hash (rather than size and timestamp)
   -overwrite               overwrite existing files in the repository
   -delete                  delete files not in the snapshot
   -ignore-owner            do not set the original uid/gid on restored files
   -stats                   show statistics during and after restore
   -threads <n>             number of downloading threads
   -limit-rate <kB/s>       the maximum download rate (in kilobytes/sec)
   -storage <storage name>  restore from the specified storage instead of the default one

The restore command restores the repository to a previous revision. By default the restore procedure will treat files that have the same sizes and timestamps as those in the snapshot as unchanged files, but with the -hash option, every file will be fully scanned to make sure they are in fact unchanged.

By default the restore procedure will not overwriting existing files, unless the -overwrite option is specified.

The -delete option indicates that files not in the snapshot will be removed.

If the -ignore-owner option is specified, the restore procedure will not attempt to restore the original user/group id ownership on restored files (all restored files will be owned by the current user); this can be useful when restoring to a new or different machine. This option is available in a version later than 2.0.9.

If the -stats option is specified, statistical information such as transfer speed, and number of chunks will be displayed throughout the restore procedure.

The -threads option can be used to specify more than one thread to download chunks.

The -limit-rate option sets a cap on the maximum download rate.

When the repository can have multiple storages (added by the add command), you can select the storage to restore from by specifying the storage name.

Unlike the backup procedure that reading the include/exclude patterns from a file, the restore procedure reads them from the command line. If the patterns can cause confusion to the command line argument parser, – should be prepended to the patterns. Please refer to the Include/Exclude Patterns section for how to specify patterns.

4 posts were split to a new topic: How to restore from Onedrive

Here is an interesting little hidden “feature”: duplicacy’s restore procedure is incremental:

i still don’t understand how incremental works as when i have different files (or just cancelled restores), i must always use -overwrite otherwise duplicacy complains that the files already exist.

I have the same question - actually I’m not able to continue restore process after interruption. I got following error message:

Restoring /mnt/hdd/backups to revision 6
File *** already exists.  Please specify the -overwrite option to continue

My storage is big enough and it takes few days to download all data from the cloud. So, it’s very important for me to get incremental restoration to work.

Ok, seems that it works after manual removal of file mentioned in the error message…

This is correct. Say you have half the file, duplicacy still needs to overwrite the file to make it whole (even by using half the data you already have). By specifying -overwrite you are acknowledging that duplicacy will change existing files to make them identical to the snapshot being restored.

This will cause redownload of the data if it is not in the cache. If you left it and specified -overwrite it would have…

…making the existing files match what was in the snapshot.

You can see the code here: