~ubuntu-branches/ubuntu/precise/duplicity/precise

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
.TH RDIFFDIR 1 "July 2008" "Version 0.4.12" "User Manuals"

.SH NAME
duplicity \- Encrypted backup using rsync algorithm

.SH SYNOPSIS
.B duplicity
.BI [ options ]
.I source_directory target_url

.B duplicity
.BI [ options ]
.I source_url target_directory

.B duplicity full
.BI [ options ]
.I source_directory target_url

.B duplicity incremental
.BI [ options ]
.I source_directory target_url

.B duplicity restore
.BI [ options ]
.I source_url target_directory

.B duplicity verify
.BI [ options ]
.I source_url target_directory

.B duplicity collection-status
.BI [ options ]
.I target_url

.B duplicity list-current-files
.BI [ options ]
.I target_url

.B duplicity cleanup
.BI [ options ]
.I target_url

.B duplicity remove-older-than
.I time
.BI [ options ]
.I target_url

.B duplicity remove-all-but-n-full
.I count
.BI [ options ]
.I target_url

.SH DESCRIPTION
Duplicity incrementally backs up files and directory
by encrypting tar-format volumes with GnuPG and uploading them to a
remote (or local) file server.  Currently local, ftp, ssh/scp, rsync,
WebDAV, WebDAVs, HSi and Amazon S3 backends are available.  
Because duplicity uses
librsync, the incremental archives are space efficient and only record
the parts of files that have changed since the last backup.  Currently
duplicity supports deleted files, full unix permissions, directories,
symbolic links, fifos, etc., but not hard links.

Duplicity will read the PASSPHRASE environment variable to find the
passphrase to give to GnuPG.  If this is not set, the user will be
prompted for the passphrase.

If you are backing up the root directory /, remember to --exclude
/proc, or else duplicity will probably crash on the weird stuff in
there.

.SH EXAMPLES
Here is an example of a backup, using scp to back up /home/me to
some_dir on the other.host machine:
.PP
.RS
duplicity /home/me scp://uid@other.host/some_dir
.PP
.RE
If the above is run repeatedly, the first will be a full backup, and
subsequent ones will be incremental.  To force a full backup, use the
.I full
action:
.PP
.RS
duplicity full /home/me scp://uid@other.host/some_dir
.PP
.RE
Now suppose we accidentally delete /home/me and want to restore it
the way it was at the time of last backup:
.PP
.RS
duplicity scp://uid@other.host/some_dir /home/me
.PP
.RE
Duplicity enters restore mode because the URL comes before the local
directory.  If we wanted to restore just the file "Mail/article" in
/home/me as it was three days ago into /home/me/restored_file:
.PP
.RS
duplicity -t 3D --file-to-restore Mail/article scp://uid@other.host/some_dir /home/me/restored_file
.PP
.RE
The following command compares the files we backed up, so see what has
changed since then:
.PP
.RS
duplicity verify scp://uid@other.host/some_dir /home/me
.PP
.RE
Finally, duplicity recognizes several include/exclude options.  For
instance, the following will backup the root directory, but exclude
/mnt, /tmp, and /proc:
.PP
.RS
duplicity --exclude /mnt --exclude /tmp --exclude /proc /
file:///usr/local/backup
.PP
.RE
Note that in this case the destination is the local directory
/usr/local/backup.  The following will backup only the /home and /etc
directories under root:
.PP
.RS
duplicity --include /home --include /etc --exclude '**' /
file:///usr/local/backup
.PP
.RE
Duplicity can also access a repository via ftp.  If a user name is
given, the environment variable FTP_PASSWORD is read to determine the
password:
.PP
.RS
FTP_PASSWORD=mypassword duplicity /local/dir ftp://user@other.host/some_dir

.SH ACTIONS
.TP
.B cleanup
Delete the extraneous duplicity files on the given backend.
Non-duplicity files, or files in complete data sets will not be
deleted.  This should only be necessary after a duplicity session
fails or is aborted prematurely.
.TP
.B collection-status
Summarize the status of the backup repository by printing the chains
and sets found, and the number of volumes in each.
.TP
.B full
Indicate full backup.  If this is set, perform full backup even if
signatures are available.
.TP
.BR incr
If this is requested an incremental backup will be performed.
Duplicity will abort if old signatures cannot be
found.  The default is to switch to full backup under these
conditions.
.TP
.B list-current-files
Lists the files currently backed up in the archive.  The information
will be extracted from the signature files, not the archive data
itself.  Thus the whole archive does not have to be downloaded, but on
the other hand if the archive has been deleted or corrupted, this
command may not detect it.
.TP
.BI "remove-older-than " time
Delete all backup sets older than the given time.  If old backup sets
will not be deleted if backup sets newer than
.I time
depend on them.  See the 
.B TIME FORMATS
section for more information.  Note, this action cannot be combined
with backup or other actions, such as cleanup.
.TP
.BI "remove-all-but-n-full " count
Delete all backups sets that are older than the count:th last full
backup (in other words, keep the last
.I count
full backups and associated incremental sets).
.I count
must be larger than zero. A value of 1 means that only the single most
recent backup chain will be kept.
.TP
.B verify
Enter verify mode instead of restore.  If the --file-to-restore option
is given, restrict verify to that file or directory.  duplicity will
exit with a non-zero error level if any files are different.  On
verbosity level 4 or higher, log a message for each file that has
changed.

.SH OPTIONS
.TP
.BI --allow-source-mismatch
Do not abort on attempts to use the same archive dir or remote backend
to back up different directories.  duplicity will tell you if you need
this switch.
.TP
.BI "--archive-dir " path
When backing up or restoring, specify the local archive directory.  
This option is not necessary, but if hash data is found locally in
.I path
it will be used in preference to the remote hash data. Use of this
option does not imply that the archive data is no longer stored
in the backup destination, nor that the local archive directory
need be kept safe. The local archive directory is a performance
optimization only, and may safely be discarded at any time.
.TP
.BI "--encrypt-key " key
When backing up, encrypt to the given public key, instead of using
symmetric (traditional) encryption.  Can be specified multiple times.
.TP
.BI "--exclude " shell_pattern
Exclude the file or files matched by
.IR shell_pattern .
If a directory is matched, then files under that directory will also
be matched.  See the
.B FILE SELECTION
section for more information.
.TP
.B "--exclude-device-files"
Exclude all device files.  This can be useful for security/permissions
reasons or if rdiff-backup is not handling device files correctly.
.TP
.BI "--exclude-filelist " filename
Excludes the files listed in 
.IR filename .
See the
.B FILE SELECTION
section for more information.
.TP
.B --exclude-filelist-stdin
Like
.B --exclude-filelist,
but the list of files will be read from standard input.  See the
.B FILE SELECTION
section for more information.
.TP
.BR "--exclude-globbing-filelist " filename
Like
.B --exclude-filelist
but each line of the filelist will be interpreted according to the
same rules as
.B --include
and
.B --exclude.
.TP
.B --exclude-other-filesystems
Exclude files on file systems (identified by device number) other than
the file system the root of the source directory is on.
.TP
.BI "--exclude-regexp " regexp
Exclude files matching the given regexp.  Unlike the
.B --exclude
option, this option does not match files in a directory it matches.
See the
.B FILE SELECTION
section for more information.
.TP
.BI "--file-to-restore " path
This option may be given in restore mode, causing only
.I path
to be restored instead of the entire contents of the backup archive.
.I path
should be given relative to the root of the directory backed up.
.TP
.BI "--full-if-older-than " time
Perform a full backup if an incremental backup is requested, but the
latest full backup in the collection is older than the given 
.IR time .
See the 
.B TIME FORMATS
section for more information.
.TP
.B --force
Proceed even if data loss might result.  Duplicity will let the user
know when this option is required.
.TP
.B --ftp-passive
Use passive (PASV) data connections.  The default is to use passive, 
but to fallback to regular if the passive connection fails or times
out.
.TP
.B --ftp-regular
Use regular (PORT) data connections.
.TP
.BI "--gpg-options " options
Allows you to pass options to gpg encryption.  The 
.I options 
list should be of the form "opt1=parm1 opt2=parm2" where the string is
quoted and the only spaces allowed are between options.
.TP
.BI "--include " shell_pattern
Similar to
.B --exclude
but include matched files instead.  Unlike
.BR --exclude ,
this option will also match parent directories of matched files
(although not necessarily their contents).  See the
.B FILE SELECTION
section for more information.
.TP
.BI "--include-filelist " filename
Like
.BR --exclude-filelist ,
but include the listed files instead.  See the
.B FILE SELECTION
section for more information.
.TP
.B --include-filelist-stdin
Like
.BR --include-filelist ,
but read the list of included files from standard input.
.TP
.BI "--include-globbing-filelist " filename
Like
.B --include-filelist
but each line of the filelist will be interpreted according to the
same rules as
.B --include
and
.B --exclude.
.TP
.BI "--include-regexp " regexp
Include files matching the regular expression
.IR regexp .
Only files explicitly matched by
.I regexp
will be included by this option.  See the
.B FILE SELECTION
section for more information.
.TP
.B --no-encryption
Do not use GnuPG to encrypt files on remote system.  Instead just
write gzipped volumes.
.TP
.B --no-print-statistics
By default duplicity will print statistics about the current session
after a successful backup.  This switch disables that behavior.
.TP
.B --null-separator
Use nulls (\\0) instead of newlines (\\n) as line separators, which
may help when dealing with filenames containing newlines.  This
affects the expected format of the files specified by the
--{include|exclude}-filelist[-stdin] switches as well as the format of
the directory statistics file.
.TP
.BI "--num-retries " number
Number of retries to make on errors before giving up.
.TP
.BI "--scp-command " command
This option only matters when using the ssh/scp backend.  The
.I command
will be used instead of scp to send or receive files.  The default 
is "scp". To list and delete existing files, the sftp command is used.  See
.BR --ssh-options 
and 
.BR --sftp-command .
.TP
.BI "--sftp-command " command
This option only matters when using the ssh/scp backend.  The 
.I command
will be used instead of sftp for listing and deleting files.  The
default is "sftp". File transfers are done using the scp command. See
.BR --ssh-options 
and 
.BR --scp-command .
.TP
.BI "--sign-key " key
This option can be used when backing up or restoring.  When backing
up, all backup files will be signed with keyid
.IR key .
When restoring, duplicity will signal an error if any remote file is
not signed with the given keyid.
.I key
should be an 8 character hex string, like AA0E73D2.
.TP
.B --ssh-askpass
Tells the ssh/scp backend to use FTP_PASSWORD from the environment,
or, if that is not present, to prompt the user for the remote system
password.
.TP
.BI "--ssh-options " options
Allows you to pass options to the ssh/scp/sftp backend.  The 
.I options 
list should be of the form "opt1=parm1 opt2=parm2" where the option string is
quoted and the only spaces allowed are between options. The option string 
will be passed verbatim to both scp and sftp, whose command line syntax 
differs slightly: options passed with 
.BR --ssh-options
should therefore be given in the long option format described in 
.BR ssh_config(5) ,
like in this example:
.PP
.RS
duplicity --ssh-options="-oProtocol=2 -oIdentityFile=/my/backup/id" /home/me scp://uid@other.host/some_dir
.PP
.RE

.TP
.BI --short-filenames
If this option is specified, the names of the files duplicity writes
will be shorter (about 30 chars) but less understandable.  This may be
useful when backing up to MacOS or another OS or FS that doesn't
support long filenames.
.TP
.BI "--tempdir " directory
Use this existing directory for duplicity temporary files instead of
the system default, which is usually the /tmp directory. This option
supercedes any environment variable.
.TP
.BI -t time ", --restore-time " time
When restoring, specify the time to restore to.
.TP
.BI "--time-separator " char
Use 
.IR char
as the time separator in filenames instead of colon (":").
.TP
.BI -v [0-9] ", --verbosity " [0-9]
Specify verbosity level (0 is total silent, 3 is the default, and 9 is
noisiest).
.TP
.BI --version
Print duplicity's version and quit.
.TP
.BI "--volsize " number
Change the volume size to 
.IR number 
Mb. Default is 5Mb.


.SH URL FORMAT
Duplicity tries to maintain a standard URL format as much as possible.
The generic format for a URL is:
.PP
.RS
scheme://user[:password]@host[:port]/[/]path
.PP
.RE
It is not recommended to expose the password on the command line since
it could be revealed to anyone with permissions to do process listings,
however, it is permitted.
.PP
In protocols that support it, the path may be preceeded by a single 
slash, '/path', to represent a relative path to the target home directory, 
or preceeded by a double slash, '//path', to represent an absolute 
filesystem path.
.PP
Formats of each of the URL schemes follow:
.PP
.RS
ssh://user[:password]@other.host[:port]/some_dir
.PP
scp://user[:password]@other.host[:port]/some_dir
.PP
ftp://user[:password]@other.host[:port]/some_dir
.PP
hsi://user[:password]@other.host/some_dir
.PP
file:///some_dir
.PP
rsync://user[:password]@other.host[:port]::/module/some_dir
.PP
rsync://user[:password]@other.host[:port]/relative_path
.PP
rsync://user[:password]@other.host[:port]//absolute_path
.PP
s3://host/bucket_name[/prefix]
.PP
s3+http://bucket_name[/prefix]
.PP
webdav://user[:password]@other.host/some_dir
.PP
webdavs://user[:password]@other.host/some_dir
.RE

.SH TIME FORMATS
duplicity uses time strings in two places.  Firstly, many of the files
duplicity creates will have the time in their filenames in the w3
datetime format as described in a w3 note at
http://www.w3.org/TR/NOTE-datetime.  Basically they look like
"2001-07-15T04:09:38-07:00", which means what it looks like.  The
"-07:00" section means the time zone is 7 hours behind UTC.
.PP
Secondly, the
.BR -t ", and " --restore-time
options take a time string, which can be given in any of several
formats:
.IP 1.
the string "now" (refers to the current time)
.IP 2.
a sequences of digits, like "123456890" (indicating the time in
seconds after the epoch)
.IP 3.
A string like "2002-01-25T07:00:00+02:00" in datetime format 
.IP 4.
An interval, which is a number followed by one of the characters s, m,
h, D, W, M, or Y (indicating seconds, minutes, hours, days, weeks,
months, or years respectively), or a series of such pairs.  In this
case the string refers to the time that preceded the current time by
the length of the interval.  For instance, "1h78m" indicates the time
that was one hour and 78 minutes ago.  The calendar here is
unsophisticated: a month is always 30 days, a year is always 365 days,
and a day is always 86400 seconds.
.IP 5.
A date format of the form YYYY/MM/DD, YYYY-MM-DD, MM/DD/YYYY, or
MM-DD-YYYY, which indicates midnight on the day in question, relative
to the current timezone settings.  For instance, "2002/3/5",
"03-05-2002", and "2002-3-05" all mean March 5th, 2002.

.SH FILE SELECTION
duplicity accepts the same file selection options
.B rdiff-backup
does, including --exclude, --exclude-filelist-stdin, etc.

When duplicity is run, it searches through the given source
directory and backs up all the files specified by the file selection
system.  The file selection system comprises a number of file
selection conditions, which are set using one of the following command
line options:
.BR --exclude ,
.BR --exclude-device-files ,
.BR --exclude-filelist ,
.BR --exclude-filelist-stdin ,
.BR --exclude-globbing-filelist ,
.BR --exclude-regexp ,
.BR --include ,
.BR --include-filelist ,
.BR --include-filelist-stdin ,
.BR --include-globbing-filelist ,
and
.BR --include-regexp .
Each file selection condition either matches or doesn't match a given
file.  A given file is excluded by the file selection system exactly
when the first matching file selection condition specifies that the
file be excluded; otherwise the file is included.

For instance,
.PP
.RS
duplicity --include /usr --exclude /usr /usr scp://user@host/backup
.PP
.RE
is exactly the same as
.PP
.RS
duplicity /usr scp://user@host/backup
.PP
.RE
because the include and exclude directives match exactly the same
files, and the
.B --include
comes first, giving it precedence.  Similarly,
.PP
.RS
duplicity --include /usr/local/bin --exclude /usr/local /usr
scp://user@host/backup
.PP
.RE
would backup the /usr/local/bin directory (and its contents), but not
/usr/local/doc.

The
.BR include ,
.BR exclude ,
.BR include-globbing-filelist ,
and
.B exclude-globbing-filelist
options accept
.IR "extended shell globbing patterns" .
These patterns can contain the special patterns
.BR * ,
.BR ** ,
.BR ? ,
and
.BR [...] .
As in a normal shell,
.B *
can be expanded to any string of characters not containing "/",
.B ?
expands to any character except "/", and
.B [...]
expands to a single character of those characters specified (ranges
are acceptable).  The new special pattern,
.BR ** ,
expands to any string of characters whether or not it contains "/".
Furthermore, if the pattern starts with "ignorecase:" (case
insensitive), then this prefix will be removed and any character in
the string can be replaced with an upper- or lowercase version of
itself.

Remember that you may need to quote these characters when typing them
into a shell, so the shell does not interpret the globbing patterns
before duplicity sees them.

The
.BI "--exclude " pattern
option matches a file iff:
.TP
.B 1.
.I pattern
can be expanded into the file's filename, or
.TP
.B 2.
the file is inside a directory matched by the option.
.PP
.RE
Conversely,
.BI "--include " pattern
matches a file iff:
.TP
.B 1.
.I pattern
can be expanded into the file's filename,
.TP
.B 2.
the file is inside a directory matched by the option, or
.TP
.B 3.
the file is a directory which contains a file matched by the option.
.PP
.RE
For example,
.PP
.RS
.B --exclude
/usr/local
.PP
.RE
matches /usr/local, /usr/local/lib, and /usr/local/lib/netscape.  It
is the same as --exclude /usr/local --exclude '/usr/local/**'.
.PP
.RS
.B --include
/usr/local
.PP
.RE
specifies that /usr, /usr/local, /usr/local/lib, and
/usr/local/lib/netscape (but not /usr/doc) all be backed up.  Thus you
don't have to worry about including parent directories to make sure
that included subdirectories have somewhere to go.  Finally,
.PP
.RS
.B --include
ignorecase:'/usr/[a-z0-9]foo/*/**.py'
.PP
.RE
would match a file like /usR/5fOO/hello/there/world.py.  If it did
match anything, it would also match /usr.  If there is no existing
file that the given pattern can be expanded into, the option will not
match /usr.

The
.BR --include-filelist ,
.BR --exclude-filelist ,
.BR --include-filelist-stdin ,
and
.B --exclude-filelist-stdin
options also introduce file selection conditions.  They direct
duplicity to read in a file, each line of which is a file
specification, and to include or exclude the matching files.  Lines
are separated by newlines or nulls, depending on whether the
--null-separator switch was given.  Each line in a filelist is
interpreted similarly to the way
.I extended shell patterns
are, with a few exceptions:
.TP
.B 1.
Globbing patterns like
.BR * ,
.BR ** ,
.BR ? ,
and
.B [...]
are not expanded.
.TP
.B 2.
Include patterns do not match files in a directory that is included.
So /usr/local in an include file will not match /usr/local/doc.
.TP
.B 3.
Lines starting with "+ " are interpreted as include directives, even
if found in a filelist referenced by
.BR --exclude-filelist .
Similarly, lines starting with "- " exclude files even if they are
found within an include filelist.

.RE
For example, if file "list.txt" contains the lines:

.RS
/usr/local
.RE
.RS
- /usr/local/doc
.RE
.RS
/usr/local/bin
.RE
.RS
+ /var
.RE
.RS
- /var

.RE
then "--include-filelist list.txt" would include /usr, /usr/local, and
/usr/local/bin.  It would exclude /usr/local/doc,
/usr/local/doc/python, etc.  It neither excludes nor includes
/usr/local/man, leaving the fate of this directory to the next
specification condition.  Finally, it is undefined what happens with
/var.  A single file list should not contain conflicting file
specifications.

The
.B --include-globbing-filelist
and
.B --exclude-globbing-filelist
options also specify filelists, but each line in the filelist will be
interpreted as a globbing pattern the way
.B --include
and
.B --exclude
options are interpreted (although "+ " and "- " prefixing is still
allowed).  For instance, if the file "globbing-list.txt" contains the
lines:

.RE
.RS
dir/foo
.RE
.RS
+ dir/bar
.RE
.RS
- **

.RE
Then "--include-globbing-filelist globbing-list.txt" would be exactly
the same as specifying "--include dir/foo --include dir/bar --exclude **"
on the command line.

Finally, the
.B --include-regexp
and
.B --exclude-regexp
allow files to be included and excluded if their filenames match a
python regular expression.  Regular expression syntax is too
complicated to explain here, but is covered in Python's library
reference.  Unlike the
.B --include
and
.B --exclude
options, the regular expression options don't match files containing
or contained in matched files.  So for instance
.PP
.RS
--include '[0-9]{7}(?!foo)'
.PP
.RE
matches any files whose full pathnames contain 7 consecutive digits
which aren't followed by 'foo'.  However, it wouldn't match /home even
if /home/ben/1234567 existed.

.SH OPERATION AND DATA FORMATS
This section describes duplicity's basic operation and the format of
its data files.  It should not necessary to read this section to use
duplicity.

The files used by duplicity to store backup data are tarfiles in GNU
tar format.  They can be produced independently by
.BR rdiffdir (1).
For incremental backups, new files are saved normally in the tarfile.
But when a file changes, instead of storing a complete copy of the
file, only a diff is stored, as generated by
.BR rdiff (1).
If a file is deleted, a 0 length file is stored in the tar.  It is
possible to restore a duplicity archive "manually" by using
.B tar
and then
.BR cp ,
.BR rdiff ,
and
.B rm
as necessary.  These duplicity archives have the extension
.BR difftar .

Both full and incremental backup sets have the same format.  In
effect, a full backup set is an incremental one generated from an
empty signature (see below).  The files in full backup sets will start
with
.B duplicity-full
while the incremental sets start with
.BR duplicity-inc .
When restoring, duplicity applies patches in order, so deleting, for
instance, a full backup set may make related incremental backup sets
unuseable.

In order to determine which files have been deleted, and to calculate
diffs for changed files, duplicity needs to process information about
previous sessions.  It stores this information in the form of tarfiles
where each entry's data contains the signature (as produced by
.BR rdiff )
of the file instead of the file's contents.  These signature sets have
the extension
.BR sigtar .

Signature files are not required to restore a backup set, but without
an up-to-date signature, duplicity cannot append an incremental backup
to an existing archive.

To save bandwidth, duplicity generates full signature sets and
incremental signature sets.  A full signature set is generated for
each full backup, and an incremental one for each incremental backup.
These start with
.B duplicity-full-signatures
and
.B duplicity-new-signatures
respectively.  If
.B --archive-dir
is used, these signatures will be stored both locally and remotely.
The remote signatures will be encrypted if encryption is enabled.
The local signatures will not be encrypted

.SH ENVIRONMENT VARIABLES
.TP
.B TMPDIR, TEMP, TMP
In decreasing order of importance, specifies the directory to use for
temporary files (inherited from Python's tempfile module).

.SH BUGS
Hard links currently unsupported (they will be treated as non-linked
regular files).

Bad signatures will be treated as empty instead of logging appropriate
error message.

.SH AUTHOR
Original Author - Ben Escoto <bescoto@stanford.edu>

Current Maintainer - Kenneth Loafman <kenneth@loafman.com>

.SH SEE ALSO
.BR rdiffdir (1),
.BR python (1),
.BR rdiff (1),
.BR rdiff-backup (1).