Check command details

   duplicacy check - Check the integrity of snapshots

   duplicacy check [command options]

   -all, -a                       check snapshots with any id
   -id <snapshot id>              check snapshots with the specified id rather than the default one
   -r <revision> [+]              the revision number of the snapshot
   -t <tag>                       check snapshots with the specified tag
   -fossils                       search fossils if a chunk can't be found
   -resurrect                     turn referenced fossils back into chunks
   -files                         verify the integrity of every file
   -chunks                        verify the integrity of every chunk
   -stats                         show deduplication statistics (imply -all and all revisions)
   -tabular                       show tabular usage and deduplication statistics (imply -stats, -all, and all revisions)
   -storage <storage name>        retrieve snapshots from the specified storage
   -key <private key>             the RSA private key to decrypt file chunks
   -key-passphrase <passphrase>   the passphrase to decrypt the RSA private key
   -threads <n>                   number of threads used to verify chunks
   -persist                       continues even if errors occur

The check command checks, for each specified snapshot, that all referenced chunks exist in the storage.

By default the check command will check snapshots created from the
current repository, but you can check all snapshots stored in the storage at once by specifying the -all option, or snapshots from a different repository using the -id option, and/or snapshots with a particular tag with the -t option.

The revision number is a number assigned to the snapshot when it is being created. This number will keep increasing every time a new snapshot is created from a repository. You can refer to snapshots by their revision numbers using the -r option, which either takes a single revision number -r 123 or a range -r 123-456. There can be multiple -r options.

By default the check command only verifies the existence of chunks. To verify the full integrity of a snapshot, you should specify the -files option, which will download chunks and compute file hashes in memory, to make sure that all hashes match. Read this post to understand why you should think twice before using the -files option.

You can also verify the integrity of snapshots with the -chunks option. Unlike the -files option, this option will download and check each chunk once. The list of verified chunks will be saved to .duplicacy/cache/storage/verified_chunks and chunks in this file will not be verified again in subsequent runs. You can delete this file to force the check command to verify all chunks.

By default the check command does not find fossils. If the -fossils option is specified, it will find the fossil if the referenced chunk does not exist. if the -resurrect option is specified, it will turn the fossil back into a chunk.

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

The -key and -key-passphrase options are needed if the storage is encrypted by an RSA key and if -chunks or -files are specified.

With -threads you can use multiple threads to verify chunks when -chunks is present.