duplicity(1)
Duplicity backs up files encrypted and incremental to local or remote storage, supporting multiple backends.
Synopsis
duplicity [OPTION]... [full|incremental|list-current-files|verify|remove-older-than|cleanup] [SOURCE] [DESTINATION]Description
Duplicity is an encrypted bandwidth-efficient backup tool that uses tar and GnuPG to create full and incremental backups. It supports local filesystems, rsync, SSH/SCP, FTP, WebDAV, S3, Rackspace CloudFiles, and other remote backends.
Backups are stored as encrypted tar-format files with optional compression. Duplicity automatically manages full and incremental backup chains, allowing restoration from any point in time.
By default, duplicity creates an incremental backup. Use the full command to force a full backup, or incremental for an incremental backup.
Common options
| Flag | What it does |
|---|---|
--full-if-older-than DAYS | Create full backup if the last full backup is older than specified days |
--encrypt-key KEYID | Encrypt backup with specified GPG key ID |
--sign-key KEYID | Sign backup with specified GPG key ID for authenticity |
-r DAYS, --restore-time DAYS | Restore files from DAYS ago (backup is restored to a specific point in time) |
--file-to-restore PATH | Restore only the specified file or directory from the backup |
--verbosity LEVEL | Set verbosity level: error, warning, notice, info, debug (default: notice) |
--exclude PATTERN | Exclude files matching pattern from backup |
--include PATTERN | Include files matching pattern in backup |
--name BACKUP_NAME | Set a unique name for this backup chain; useful for multiple backup sets |
--asynchronous-upload | Upload volumes asynchronously for better performance |
--no-compression | Disable compression; useful for already-compressed data |
--archive-dir DIRECTORY | Store metadata cache in specified directory (speeds up operations) |
Examples
Create incremental backup of /home/user to S3 bucket; prompts for encryption passphrase
duplicity /home/user s3://my-bucket/backupsCreate full encrypted backup via SFTP using GPG key 1A2B3C4D
duplicity full --encrypt-key 1A2B3C4D /home/user sftp://[email protected]/backupsRestore single file from 7 days ago to /tmp/restore directory
duplicity --file-to-restore documents/important.pdf -r 7D /home/user /tmp/restoreVerify backup integrity by comparing against source files
duplicity verify --archive-dir ~/.cache/duplicity s3://my-bucket/backups /home/userList all files in the current backup set on S3
duplicity list-current-files s3://my-bucket/backupsDelete backup chains older than 90 days, keeping recent backups
duplicity remove-older-than 90D s3://my-bucket/backupsBackup to local disk while excluding temporary and cache files
duplicity --exclude '*.tmp' --exclude '/home/user/.cache' /home/user /mnt/backup-diskRemove partial or broken backup files from S3 storage
duplicity cleanup --force s3://my-bucket/backups