From bfeda618c0fd5bd702339219ecc343353c39eb34 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 4 Oct 2002 00:03:00 +0000 Subject: Added --exclude-special-files and --{exclude|include}-globbing-filelist options to selection code. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@213 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 18 ++++++++++ rdiff-backup/TODO | 13 ++------ rdiff-backup/rdiff-backup.1 | 80 +++++++++++++++++++++++++++++++++++++-------- 3 files changed, 87 insertions(+), 24 deletions(-) (limited to 'rdiff-backup') diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 9d77055..09b02d8 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -5,6 +5,24 @@ If get a socket error from trying to create a socket whose name is too long, just skip file instead of exiting with error (bug report by Ivo De Decker). +Added --exclude-special-files switch, which excludes fifos, symlinks, +sockets, and device files. + +--windows-mode is now short for --windows-time-format --chars-to-quote +A-Z: --exclude-special-files. Thanks to Paul-Erik Törrönen for some +helpful windows info. + +Multiple --include and --exclude statements can now be given in a +single file. See the documentation on +--{include|exclude}-globbing-filelist. Thanks to Henrik Lewander for +pointing out that command line length could otherwise be a problem. + +Fixed bug in filelist processing that ignored leading or trailing +whitespace in filelists. Now filenames with, for instance, trailing +spaces can be used in filelists. Filelists which took advantage of +this bug for formatting may have to be editted. + + New in v0.10.1 (2002/09/16) --------------------------- diff --git a/rdiff-backup/TODO b/rdiff-backup/TODO index c44741c..cc2624c 100644 --- a/rdiff-backup/TODO +++ b/rdiff-backup/TODO @@ -1,19 +1,12 @@ -add --exclude-special-files to exclude fifos, symlinks, sockets, and -device files. - -Change Windows mode to quote A-Z also. (--windows-mode could be short -for "--exclude-special-files --chars-to-quote A-Z: --quoting-char ; ---windows-time-format"). - Write some better selection test cases to test new Iterate_fast func. Work on killtest code - avoid returning a failure when a file is simply skipped. ----------[ Medium term ]--------------------------------------- +Look at error code, make sure filename is always mentioned (see Knops +email). -Interpret a list of filenames in globbing form -(--include-globbing-filelist maybe). +---------[ Medium term ]--------------------------------------- Add --dry-run option (target for v1.1.x) diff --git a/rdiff-backup/rdiff-backup.1 b/rdiff-backup/rdiff-backup.1 index 87e0c25..8f36230 100644 --- a/rdiff-backup/rdiff-backup.1 +++ b/rdiff-backup/rdiff-backup.1 @@ -114,6 +114,15 @@ 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 .BI "--exclude-mirror " regexp Exclude files in the mirror area matching regexp. This argument can be used multiple times. The rdiff-backup-data directory is @@ -131,6 +140,10 @@ See the .B FILE SELECTION section for more information. .TP +.B --exclude-device-files +Exclude all device files, fifos, sockets, and symlinks. This option +is implied by --windows-mode. +.TP .B --force Authorize the updating or overwriting of a destination path. rdiff-backup will generally tell you if it needs this. @@ -156,6 +169,14 @@ section for more information. Like .BR --include-filelist , but read the list of included files from standard input. +.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 @@ -334,15 +355,18 @@ is noisiest). This determines how much is written to the log file. Print the current version and exit .TP .B --windows-mode -This option is short for "--chars to quote : --windows-time-format" -and is appropriate when backing up to a filesystem that doesn't allow -colons in filenames. +This option is short for "--chars to quote A-Z: --windows-time-format +--exclude-special-files" and is appropriate when backing a normal unix +file system to one that doesn't allow colons in filenames and is not +case sensitive. --windows-mode should not be necessary when backing +up one windows file system to another, although --windows-time-format +would still be required. .TP .B --windows-time-format If this option is present, use underscores instead of colons in increment files, so 2001-07-15T04:09:38-07:00 becomes -2001-07-15T04_09_38-07_00. This option may be useful under MS windows -NT, which prohibits colons in filenames. +2001-07-15T04_09_38-07_00. This option may be useful under various +Microsoft file systems, which prohibit colons in filenames. .SH EXAMPLES Simplest case---backup directory foo to directory bar, with increments @@ -586,13 +610,11 @@ 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-regexp , +.BR --exclude , --exclude-device-files , --exclude-filelist , +.BR --exclude-globbing-filelist , +.BR --exclude-filelist-stdin , --exclude-regexp , --exclude-special-files , .BR --include , -.BR --include-filelist , +.BR --include-filelist , --include-globbing-filelist , .BR --include-filelist-stdin , and .BR --include-regexp . @@ -626,9 +648,11 @@ would backup the /usr/local/bin directory (and its contents), but not /usr/local/doc. The -.B include +.BR include , +.BR exclude , +.BR include-globbing-filelist , and -.B exclude +.B exclude-globbing-filelist options accept .IR "extended shell globbing patterns" . These patterns can contain the special patterns @@ -749,7 +773,7 @@ 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: +For example, if the file "list.txt" contains the lines: .RS /usr/local @@ -775,6 +799,34 @@ 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 -- cgit v1.2.1