A shell frontend to duplicity for simplified backups
duply profile create
duply profile command [options ...]
duply profile command[_command_...] [options ...]
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 for every command - 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).
Hint: If the folder /etc/duply exists, the profiles for the superuser root will be searched and created there.
First time usage (profile creation):
duply <profile> create
General usage in single mode (see \s-1EXAMPLES\s0):
duply <profile> <command> [<options> ...]
General usage in batch mode joining commands with '_' (see \s-1EXAMPLES\s0):
duply <profile> <command>[[_|+|-]<command>[_|+|-]...] [<options> ...]
For batches the conditional separators can also be written as pseudo commands and(+), or(-). See \s-1SEPARATORS\s0 for details.
Non duply options are passed on to duplicity (see \s-1OPTIONS\s0). All config parameters can also be defined in the environment instead.
neutral separator
conditional \s-1AND\s0; the next command will only be executed if the previous succeeded
conditional \s-1OR\s0; the next command will only be executed if the previous failed
Example: 'pre+bkp-verify_post' translates to 'pre_and_bkp_or_verify_post'
Indicated by a path or a profile name i.e. sample, which is resolved to ~/.duply/sample ('~' expands to environment variable $HOME).
Superuser root can place profiles under /etc/duply. Simply create the folder manually before running duply as superuser.
\s-1ATTENTION:\s0 Already existing profiles in root's profile folder will cease to work unless they are moved to the new location manually.
Usually only the profile name will be used:
duply humbug backup
Alternatively a path might be used. This might be useful for quick testing, restoring or exotic locations. Shell expansion should work as usual:
duply ~/.duplytest/humbug backup
\s-1ATTENTION:\s0 The path must contain at least one '/', e.g ./test instead of only test.
Get usage help text.
Pseudo commands for better batch cmd readability (see \s-1SEPARATORS\s0).
Creates a configuration profile.
Backup with pre/post script execution (as batch the same as: pre_bkp_post)
as full backup if parameter full_if_older matches or no earlier backup is found.
as incremental backup in all other cases.
As above but without executing pre/post scripts.
Force full backup.
Force incremental backup.
Execute only script '<profile>/pre' (for debugging purposes).
Execute only script '<profile>/post' (for debugging purposes).
List all files in backup (as it was at age, default: now).
Print backup sets and chains currently in repository.
List files changed, since age if given.
List changes of a file or folder path in backup compared to a local path, since age if given.
Restore the complete backup to target_path (as it was at age).
Fetch single file/folder from backup (as it was at age).
List outdated backup archives (older than max_age). Use option --force to actually delete these files.
List outdated backup files. max_full_backups being the number of full backups and associated incrementals to keep, counting in reverse chronological order. Use option --force to actually delete these files.
List outdated incremental backup files. max_fulls_with_incrs being the number of full backups which associated incrementals will be kept, counting in reverse chronological order. Use option --force to actually delete these files.
List broken backup chain files archives (e.g. after unfinished run). Use option --force to actually delete these files.
Show version information of duply and needed programs.
Passed to duplicity (see commands: purge, purge-full, purge-incr, cleanup).
Do nothing but print out generated duplicity command lines.
Disable encryption, override profile settings.
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)
Useful internal duply variables will be readable in the scripts. Some of interest may be
CONFDIR, SOURCE, TARGET_URL_<PROT|HOSTPATH|USER|PASS>, GPG_<KEYS_ENC|KEY_SIGN|PW>, CMD_<PREV|NEXT>, CMD_ERR
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 \s-1CMD_NEXT\s0 variable set to 'bkp' on the first and to 'verify' on the second run. \s-1CMD_ERR\s0 holds the exit code of the \s-1CMD_PREV\s0.
Create profile 'humbug':
duply humbug create
and then edit the resulting conf file of this profile.
Backup 'humbug' now:
duply humbug backup
List available backup sets of profile 'humbug':
duply humbug status
List and delete obsolete backup archives 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 man duplicity, section \s-1TIME\s0 \s-1FORMATS\s0 for the time format.
A one line batch job on 'humbug' for cron execution:
duply humbug backup_verify_purge --force
Files in the profile folder(~/.duply/<profile>):
conf .......... main profile configuration file pre ........... pre script (see above for details) post .......... post script (see above for details) gpgkey.*.asc .. exported GnuPG key file(s) exclude ....... a globbing list of included or excluded files/folders
The rules for the exclude file can be found in man duplicity, section \s-1FILE\s0 \s-1SELECTION\s0).
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 information (gpg data, ftp data) to access and modify your backups.
Repeat this step after all configuration changes. Some configuration options are crucial for restoration.
This program is still in development. If you find bugs write a bug report on:
http://sourceforge.net/projects/ftplicity/.
For newer versions see http://sourceforge.net/projects/ftplicity/.
Copyright (C) 2006 Christiane Ruetten, 2008-2014 Edgar Soldin
This package is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
On Debian systems, the complete text of the \s-1GNU\s0 General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
Duply was written by Christiane Ruetten (initial version, named ftplicity) and Edgar Soldin.
This manual page was written by Joachim Wiedorn <ad_debian at joonet.de> for the Debian project (and may be used by others).
duplicity\|(1)