duply man page


duply version 2.0.1 (http://duply.net)


Duply deals as a wrapper for the mighty duplicity magic. It simplifies running duplicity with cron or on command line by:

  • keeping recurring settings in profiles per backup job
  • enabling batch operations eg. backup_verify+purge
  • executing pre/post scripts (different actions possible depending on previous or next command or it's exit status)
  • precondition checking for flawless duplicity operation

For each backup job one configuration profile must be created. The profile folder will be stored under '~/.duply/<profile>' (where ~ is the current users home directory).


If the folder '/etc/duply' exists, the profiles for the super user root will be searched & created there.


first time usage (profile creation):

duply <profile> create

general usage in single or batch mode (see EXAMPLES):

duply <profile> <command>[[_|+|-]<command>[_|+|-]...] [<options> ...]

For batches the conditional separators can also be written as pseudo commands and(+), or(-). See Separators for details.

Non duply options are passed on to duplicity (see Options). All conf parameters can also be defined in the environment instead.


Indicated by a path or a profile name (<profile>), which is resolved  to '~/.duply/<profile>' (~ expands to environment variable $HOME).

Superuser root can place profiles under '/etc/duply'. Simply create the folder manually before running duply as superuser.


Already existing profiles in root's home folder will cease to work unless they are moved to the new location manually.

example 1:

duply humbug backup

Alternatively a _path_ might be used e.g. useful for quick testing,  restoring or exotic locations. Shell expansion should work as usual.


The path must contain at least one path separator '/',  e.g. './test' instead of only 'test'.

example 2:

duply ~/.duply/humbug backup


_ (underscore)

neutral separator

+ (plus sign), _and_

conditional AND the next command will only be executed if the previous succeeded

- (minus sign), _or_

conditional OR the next command will only be executed if the previous failed


’pre+bkp-verify_post' translates to 'pre_and_bkp_or_verify_post'



get usage help text


pseudo commands for better batch cmd readability (see Separators)


creates a configuration profile


backup with pre/post script execution (batch: pre_bkp_post), full (if full_if_older matches or no earlier backup is found) incremental (in all other cases)


execute '<profile>/pre', '<profile>/post' scripts


as above but without executing pre/post scripts


force full backup


force incremental backup

list [<age>]

list all files in backup (as it was at <age>, default: now)


prints backup sets and chains currently in repository

verify [<age>] [--compare-data]

list files changed, since age if given

verifyPath <rel_path_in_bkp> <local_path> [<age>] [--compare-data]

list changes of a file or folder path in backup compared to a local path, since age if given

restore <target_path> [<age>]

restore the complete backup to <target_path> [as it was at <age>]

fetch <src_path> <target_path> [<age>]

fetch single file/folder from backup [as it was at <age>]

purge [<max_age>] [--force]

list outdated backup files (older than $MAX_AGE) [use --force to actually delete these files]

purgeFull [<max_full_backups>] [--force]

list outdated backup files ($MAX_FULL_BACKUPS being the number of full backups and associated incrementals to keep, counting in  reverse chronological order) [use --force to actually delete these files]

purgeIncr [<max_fulls_with_incrs>] [--force]

list outdated incremental backups ($MAX_FULLS_WITH_INCRS being  the number of full backups which associated incrementals will be kept, counting in reverse chronological order)  [use --force to actually delete these files]

cleanup [--force]

list broken backup chain files archives (e.g. after unfinished run) [use --force to actually delete these files]


print changelog / todo list


feature for package maintainers - create a manpage based on the  usage output. download txt2man from http://mvertes.free.fr/, put  it in the PATH and run 'duply txt2man' to create a man page.


show version information of duply and needed programs



passed to duplicity (see commands: purge, purge-full, cleanup)


do nothing but print out generated duplicity command lines


disable encryption, overrides profile settings

Time Formats

For all time related parameters like age, max_age etc. Refer to the duplicity manpage for all available formats. Here some examples: 2002-01-25T07:00:00+02:00 (full date time format string) 2002/3/5 (date string YYYY/MM/DD) 12D (interval, 12 days ago) 1h78m (interval, 1 hour 78 minutes ago)

Pre Post Scripts

Useful internal duply variables will be readable in the scripts. Some of interest may be


The CMD_* variables were introduced to allow different actions according to  the command the scripts were attached to e.g. 'pre_bkp_post_pre_verify_post'  will call the pre script two times, with CMD_NEXT variable set to 'bkp'  on the first and to 'verify' on the second run. CMD_ERR holds the exit code of the CMD_PREV .


create profile 'humbug':

duply humbug create (don't forget to edit this new conf file)

backup 'humbug' now:

duply humbug backup

list available backup sets of profile 'humbug':

duply humbug status

list and delete outdated backups of 'humbug':

duply humbug purge --force

restore latest backup of 'humbug' to /mnt/restore:

duply humbug restore /mnt/restore

restore /etc/passwd of 'humbug' from 4 days ago to /root/pw:

duply humbug fetch etc/passwd /root/pw 4D (see "duplicity manpage", section Time Formats)

a one line batch job on 'humbug' for cron execution:

duply humbug backup_verify_purge --force

batch job to run a full backup with pre/post scripts:

duply humbug pre_full_post


in profile folder '~/.duply/<profile>' or '/etc/duply'


profile configuration file


pre/post scripts (see above for details)


exported GPG key files


a globbing list of included or excluded files/folders (see "duplicity manpage", section FILE SELECTION)


Copy the _whole_ profile folder after the first backup to a safe place. It contains everything needed to restore your backups. You will need  it if you have to restore the backup from another system (e.g. after a  system crash). Keep access to these files restricted as they contain  _all_ informations (gpg data, ftp data) to access and modify your backups.

Repeat this step after _all_ configuration changes. Some configuration  options are crucial for restoration.

See Also

duplicity man page: duplicity(1) or http://duplicity.nongnu.org/duplicity.1.html


10 February 2017 duply-2.0.1 User Manuals