2017-08-19 13:15:09 +01:00
|
|
|
# duplicity
|
|
|
|
|
2024-04-18 06:04:00 +02:00
|
|
|
> Create incremental, compressed, encrypted and versioned backups.
|
2017-08-31 07:49:40 -01:00
|
|
|
> Can also upload the backups to a variety of backend services.
|
2024-04-19 23:03:54 -05:00
|
|
|
> It is worth mentioning that depending on the version, some options may not be available (e.g. `--gio` in 2.0.0).
|
2024-10-12 10:02:00 +02:00
|
|
|
> More information: <https://duplicity.gitlab.io>.
|
2017-08-19 13:15:09 +01:00
|
|
|
|
2019-02-08 01:28:43 +01:00
|
|
|
- Backup a directory via FTPS to a remote machine, encrypting it with a password:
|
2017-08-19 13:15:09 +01:00
|
|
|
|
|
|
|
`FTP_PASSWORD={{ftp_login_password}} PASSPHRASE={{encryption_password}} duplicity {{path/to/source/directory}} {{ftps://user@hostname/target/directory/path/}}`
|
|
|
|
|
2019-02-11 19:00:49 +01:00
|
|
|
- Backup a directory to Amazon S3, doing a full backup every month:
|
2017-08-19 13:15:09 +01:00
|
|
|
|
2024-01-11 03:07:13 -05:00
|
|
|
`duplicity --full-if-older-than {{1M}} s3://{{bucket_name[/prefix]}}`
|
2017-08-19 13:15:09 +01:00
|
|
|
|
2017-08-31 07:49:40 -01:00
|
|
|
- Delete versions older than 1 year from a backup stored on a WebDAV share:
|
2017-08-19 13:15:09 +01:00
|
|
|
|
|
|
|
`FTP_PASSWORD={{webdav_login_password}} duplicity remove-older-than {{1Y}} --force {{webdav[s]://user@hostname[:port]/some_dir}}`
|
|
|
|
|
2017-08-31 07:49:40 -01:00
|
|
|
- List the available backups:
|
2017-08-19 13:15:09 +01:00
|
|
|
|
2019-02-11 19:00:49 +01:00
|
|
|
`duplicity collection-status "file://{{absolute/path/to/backup/directory}}"`
|
2017-08-19 13:15:09 +01:00
|
|
|
|
2024-03-14 02:01:06 -03:00
|
|
|
- List the files in a backup stored on a remote machine, via SSH:
|
2017-08-19 13:15:09 +01:00
|
|
|
|
2024-01-01 19:26:11 +01:00
|
|
|
`duplicity list-current-files --time {{YYYY-MM-DD}} scp://{{user@hostname}}/{{path/to/backup/dir}}`
|
2017-08-19 13:15:09 +01:00
|
|
|
|
2017-08-31 07:49:40 -01:00
|
|
|
- Restore a subdirectory from a GnuPG-encrypted local backup to a given location:
|
2017-08-19 13:15:09 +01:00
|
|
|
|
2024-01-11 03:07:13 -05:00
|
|
|
`PASSPHRASE={{gpg_key_password}} duplicity restore --encrypt-key {{gpg_key_id}} --path-to-restore {{relative/path/restoredirectory}} file://{{absolute/path/to/backup/directory}} {{path/to/directory/to/restore/to}}`
|