1DUPLY(1) User Manuals DUPLY(1)
2
3
4
6 duply version 2.2 (http://duply.net)
7
9 Duply deals as a wrapper for the mighty duplicity magic. It simplifies
10 running duplicity with cron or on command line by:
11
12 · keeping recurring settings in profiles per backup job
13
14 · enabling batch operations eg. backup_verify+purge
15
16 · executing pre/post scripts (different actions possible
17 depending on previous or next command or it's exit status)
18
19 · precondition checking for flawless duplicity operation
20
21 For each backup job one configuration profile must be created. The
22 profile folder will be stored under '~/.duply/<profile>' (where ~ is
23 the current users home directory).
24
25 Hint: If the folder '/etc/duply' exists, the profiles for the super
26 user root will be searched & created there.
27
29 first time usage (profile creation):
30 duply <profile> create
31
32 general usage in single or batch mode (see EXAMPLES):
33 duply <profile> <command>[[_|+|-]<command>[_|+|-]...] [<options>
34 ...]
35
36 For batches the conditional separators can also be written as pseudo
37 commands and(+), or(-). See SEPARATORS for details.
38
39 Non duply options are passed on to duplicity (see OPTIONS). All conf
40 parameters can also be defined in the environment instead.
41
43 Indicated by a path or a profile name (<profile>), which is resolved to
44 '~/.duply/<profile>' (~ expands to environment variable $HOME).
45
46 Superuser root can place profiles under '/etc/duply'. Simply create the
47 folder manually before running duply as superuser.
48
49 Note: Already existing profiles in root's home folder will cease to
50 work unless they are moved to the new location manually.
51
52 example 1:
53 duply humbug backup
54
55 Alternatively a _path_ might be used e.g. useful for quick testing,
56 restoring or exotic locations. Shell expansion should work as usual.
57
58 Hint: The path must contain at least one path separator '/', e.g.
59 './test' instead of only 'test'.
60
61 example 2:
62 duply ~/.duply/humbug backup
63
65 _ (underscore)
66 neutral separator
67
68 + (plus sign), _and_
69 conditional AND the next command will only be executed if the
70 previous succeeded
71
72 - (minus sign), _or_
73 conditional OR the next command will only be executed if the
74 previous failed
75
76 [] (square brackets), _groupIn_/_groupOut_
77 enables grouping of commands
78
79 example:
80 ’pre+[bkp-verify]_post' translates to
81 ’pre_and_groupIn_bkp_or_verify_groupOut_post'
82
84 usage get usage help text
85
86 and/or/groupIn/groupOut
87 pseudo commands used in batches (see SEPARATORS above)
88
89 create creates a configuration profile
90
91 backup backup with pre/post script execution (batch: [pre_bkp_post]),
92 full (if full_if_older matches or no earlier backup is found)
93 incremental (in all other cases)
94
95 pre/post
96 execute '<profile>/pre', '<profile>/post' scripts
97
98 bkp as above but without executing pre/post scripts
99
100 full force full backup
101
102 incr force incremental backup
103
104 list [<age>]
105 list all files in backup (as it was at <age>, default: now)
106
107 status prints backup sets and chains currently in repository
108
109 verify [<age>] [--compare-data]
110 list files changed, since age if given
111
112 verifyPath <rel_path_in_bkp> <local_path> [<age>] [--compare-data]
113 list changes of a file or folder path in backup compared to a
114 local path, since age if given
115
116 restore <target_path> [<age>]
117 restore the complete backup to <target_path> [as it was at
118 <age>]
119
120 fetch <src_path> <target_path> [<age>]
121 fetch single file/folder from backup [as it was at <age>]
122
123 purge [<max_age>] [--force]
124 list outdated backup files (older than $MAX_AGE) [use --force to
125 actually delete these files]
126
127 purgeFull [<max_full_backups>] [--force]
128 list outdated backup files ($MAX_FULL_BACKUPS being the number
129 of full backups and associated incrementals to keep, counting in
130 reverse chronological order) [use --force to actually delete
131 these files]
132
133 purgeIncr [<max_fulls_with_incrs>] [--force]
134 list outdated incremental backups ($MAX_FULLS_WITH_INCRS being
135 the number of full backups which associated incrementals will be
136 kept, counting in reverse chronological order) [use --force to
137 actually delete these files]
138
139 cleanup [--force]
140 list broken backup chain files archives (e.g. after unfinished
141 run) [use --force to actually delete these files]
142
143 changelog
144 print changelog / todo list
145
146 txt2man
147 feature for package maintainers - create a manpage based on the
148 usage output. download txt2man from http://mvertes.free.fr/, put
149 it in the PATH and run 'duply txt2man' to create a man page.
150
151 version
152 show version information of duply and needed programs
153
155 --force
156 passed to duplicity (see commands: purge, purgeFull, purgeIncr,
157 cleanup)
158
159 --preview
160 do nothing but print out generated duplicity command lines
161
162 --disable-encryption
163 disable encryption, overrides profile settings
164
166 For all time related parameters like age, max_age etc. Refer to the
167 duplicity manpage for all available formats. Here some examples:
168 2002-01-25T07:00:00+02:00 (full date time format string) 2002/3/5 (date
169 string YYYY/MM/DD) 12D (interval, 12 days ago) 1h78m (interval, 1 hour
170 78 minutes ago)
171
173 Some useful internal duply variables are exported to the scripts.
174
175 PROFILE, CONFDIR, SOURCE, TARGET_URL_<PROT|HOSTPATH|USER|PASS>,
176 GPG_<KEYS_ENC|KEY_SIGN|PW>, CMD_ERR, RUN_START,
177 CMD_<PREV|NEXT> (previous/next command),
178 CND_<PREV|NEXT> (condition before/after)
179
180 The CMD_* variables were introduced to allow different actions accord‐
181 ing to the command the scripts were attached to e.g.
182 'pre_bkp_post_pre_verify_post' will call the pre script two times, with
183 CMD_NEXT variable set to 'bkp' on the first and to 'verify' on the sec‐
184 ond run. CMD_ERR holds the exit code of the CMD_PREV .
185
187 create profile 'humbug':
188 duply humbug create (don't forget to edit this new conf file)
189
190 backup 'humbug' now:
191 duply humbug backup
192
193 list available backup sets of profile 'humbug':
194 duply humbug status
195
196 list and delete outdated backups of 'humbug':
197 duply humbug purge --force
198
199 restore latest backup of 'humbug' to /mnt/restore:
200 duply humbug restore /mnt/restore
201
202 restore /etc/passwd of 'humbug' from 4 days ago to /root/pw:
203 duply humbug fetch etc/passwd /root/pw 4D (see "duplicity man‐
204 page", section TIME FORMATS)
205
206 a one line batch job on 'humbug' for cron execution:
207 duply humbug backup_verify_purge --force
208
209 batch job to run a full backup with pre/post scripts:
210 duply humbug pre_full_post
211
213 in profile folder '~/.duply/<profile>' or '/etc/duply'
214
215 conf profile configuration file
216
217 pre,post
218 pre/post scripts (see above for details)
219
220 gpgkey.*.asc
221 exported GPG key files
222
223 exclude
224 a globbing list of included or excluded files/folders (see
225 "duplicity manpage", section FILE SELECTION)
226
228 Copy the _whole_ profile folder after the first backup to a safe place.
229 It contains everything needed to restore your backups. You will need it
230 if you have to restore the backup from another system (e.g. after a
231 system crash). Keep access to these files restricted as they contain
232 _all_ informations (gpg data, ftp data) to access and modify your back‐
233 ups.
234
235 Repeat this step after _all_ configuration changes. Some configuration
236 options are crucial for restoration.
237
239 duplicity man page: duplicity(1) or http://duplicity.nongnu.org/duplic‐
240 ity.1.html
241
242
243
244duply-2.2 02 March 2019 DUPLY(1)