~bmerry/duplicity/pydrive-regular

« back to all changes in this revision

Viewing changes to bin/duplicity.1

* Merged in lp:~aaron-whitehouse/duplicity/filelist_combine
  - Merged globbing and non-globbing filelists to use the same code path
    and all accept globbing characters. Added deprecation warning to the
    --exclude-globbing-filelist and include-globbing-filelist options in
    commandline.py and hid them from help output. Updated the manual
    (and unit tests) accordingly.
  - Note that this does trigger a change in behaviour for duplicity.
    Previously, include patterns in include-filelist did not match files
    in a directory that was included, so /usr/local in an include file
    would not have matched /usr/local/doc. Now, this folder would be
    included, as would occur if --include or the old
    --include-globbing-filelist was used. Additional lines will therefore
    need to be added to filelists to unambiguously exclude unwanted
    subfolders, if this is intended.
  - Mark --include-filelist-stdin and --exclude-fielist-stdin for
    deprecation and hide from --help output.

Show diffs side-by-side

added added

removed removed

Lines of Context:
481
481
.TP
482
482
.BI "--exclude-filelist " filename
483
483
Excludes the files listed in
484
 
.IR filename .
485
 
See the
486
 
.B FILE SELECTION
487
 
section for more information.
488
 
 
489
 
.TP
490
 
.BI --exclude-filelist-stdin
491
 
Like
492
 
.BI --exclude-filelist,
493
 
but the list of files will be read from standard input.  See the
494
 
.B FILE SELECTION
495
 
section for more information.
496
 
 
497
 
.TP
498
 
.BR "--exclude-globbing-filelist " filename
499
 
Like
500
 
.BI --exclude-filelist
501
 
but each line of the filelist will be interpreted according to the
 
484
.IR filename,
 
485
with each line of the filelist interpreted according to the
502
486
same rules as
503
487
.BI --include
504
488
and
505
489
.BI --exclude.
 
490
See the
 
491
.B FILE SELECTION
 
492
section for more information.
506
493
 
507
494
.TP
508
495
.BR "--exclude-if-present " filename
663
650
section for more information.
664
651
 
665
652
.TP
666
 
.BI --include-filelist-stdin
667
 
Like
668
 
.BR --include-filelist ,
669
 
but read the list of included files from standard input.
670
 
 
671
 
.TP
672
 
.BI "--include-globbing-filelist " filename
673
 
Like
674
 
.BI --include-filelist
675
 
but each line of the filelist will be interpreted according to the
676
 
same rules as
677
 
.BI --include
678
 
and
679
 
.BI --exclude.
680
 
 
681
 
.TP
682
653
.BI "--include-regexp " regexp
683
654
Include files matching the regular expression
684
655
.IR regexp .
746
717
Use nulls (\\0) instead of newlines (\\n) as line separators, which
747
718
may help when dealing with filenames containing newlines.  This
748
719
affects the expected format of the files specified by the
749
 
--{include|exclude}-filelist[-stdin] switches as well as the format of
 
720
--{include|exclude}-filelist switches as well as the format of
750
721
the directory statistics file.
751
722
 
752
723
.TP
1337
1308
"03-05-2002", and "2002-3-05" all mean March 5th, 2002.
1338
1309
 
1339
1310
.SH FILE SELECTION
1340
 
duplicity accepts the same file selection options
1341
 
.B rdiff-backup
1342
 
does, including --exclude, --exclude-filelist-stdin, etc.
1343
 
 
1344
1311
When duplicity is run, it searches through the given source
1345
1312
directory and backs up all the files specified by the file selection
1346
1313
system.  The file selection system comprises a number of file
1353
1320
.br
1354
1321
--exclude-filelist
1355
1322
.br
1356
 
--exclude-filelist-stdin
1357
 
.br
1358
 
--exclude-globbing-filelist
1359
 
.br
1360
1323
--exclude-regexp
1361
1324
.br
1362
1325
--include
1363
1326
.br
1364
1327
--include-filelist
1365
1328
.br
1366
 
--include-filelist-stdin
1367
 
.br
1368
 
--include-globbing-filelist
1369
 
.br
1370
1329
--include-regexp
1371
1330
.RE
1372
1331
Each file selection condition either matches or doesn't match a given
1402
1361
The
1403
1362
.BR include ,
1404
1363
.BR exclude ,
1405
 
.BR include-globbing-filelist ,
 
1364
.BR include-filelist ,
1406
1365
and
1407
 
.B exclude-globbing-filelist
 
1366
.B exclude-filelist
1408
1367
options accept some
1409
1368
.IR "extended shell globbing patterns" .
1410
1369
These patterns can contain
1493
1452
 
1494
1453
The
1495
1454
.BR --include-filelist ,
1496
 
.BR --exclude-filelist ,
1497
 
.BR --include-filelist-stdin ,
1498
1455
and
1499
 
.BI --exclude-filelist-stdin
 
1456
.BI --exclude-filelist ,
1500
1457
options also introduce file selection conditions.  They direct
1501
1458
duplicity to read in a file, each line of which is a file
1502
1459
specification, and to include or exclude the matching files.  Lines
1503
1460
are separated by newlines or nulls, depending on whether the
1504
 
--null-separator switch was given.  Each line in a filelist is
1505
 
interpreted similarly to the way
1506
 
.I extended shell patterns
1507
 
are, with a few exceptions:
1508
 
.PP
1509
 
.B 1.
1510
 
Globbing patterns like
1511
 
.BR * ,
1512
 
.BR ** ,
1513
 
.BR ? ,
 
1461
--null-separator switch was given.  Each line in the filelist will be
 
1462
interpreted as a globbing pattern the way
 
1463
.BI --include
1514
1464
and
1515
 
.B [...]
1516
 
are not expanded.
1517
 
.br
1518
 
.B 2.
1519
 
Include patterns do not match files in a directory that is included.
1520
 
So /usr/local in an include file will not match /usr/local/doc.
1521
 
.br
1522
 
.B 3.
1523
 
Lines starting with "+ " are interpreted as include directives, even
 
1465
.BI --exclude
 
1466
options are interpreted, except that lines starting with "+ " are interpreted as include directives, even
1524
1467
if found in a filelist referenced by
1525
1468
.BR --exclude-filelist .
1526
1469
Similarly, lines starting with "- " exclude files even if they are
1544
1487
.B "--include-filelist list.txt"
1545
1488
would include /usr, /usr/local, and
1546
1489
/usr/local/bin.  It would exclude /usr/local/doc,
1547
 
/usr/local/doc/python, etc.  It neither excludes nor includes
1548
 
/usr/local/man, leaving the fate of this directory to the next
1549
 
specification condition.  Finally, it is undefined what happens with
 
1490
/usr/local/doc/python, etc.  It would also include
 
1491
/usr/local/man, as this is included within /user/local.  Finally, it is undefined what happens with
1550
1492
/var.  A single file list should not contain conflicting file
1551
1493
specifications.
1552
1494
 
1553
 
The
1554
 
.BI --include-globbing-filelist
1555
 
and
1556
 
.BI --exclude-globbing-filelist
1557
 
options also specify filelists, but each line in the filelist will be
 
1495
Each line in the filelist will also be
1558
1496
interpreted as a globbing pattern the way
1559
1497
.BI --include
1560
1498
and
1561
1499
.BI --exclude
1562
 
options are interpreted (although "+ " and "- " prefixing is still
1563
 
allowed).  For instance, if the file "globbing-list.txt" contains the
 
1500
options are interpreted.
 
1501
For instance, if the file "list.txt" contains the
1564
1502
lines:
1565
1503
 
1566
1504
.RS
1572
1510
.RE
1573
1511
 
1574
1512
Then
1575
 
.B "--include-globbing-filelist globbing-list.txt"
 
1513
.B "--include-filelist list.txt"
1576
1514
would be exactly the same as specifying
1577
1515
.B "--include dir/foo --include dir/bar --exclude **"
1578
1516
on the command line.