]> sjero.net Git - wget/commitdiff
doc: document --backups
authorGiuseppe Scrivano <gscrivano@gnu.org>
Mon, 8 Jul 2013 22:50:30 +0000 (00:50 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sat, 13 Jul 2013 11:36:55 +0000 (13:36 +0200)
doc/ChangeLog
doc/wget.texi
src/main.c

index 2b8d070134ffe2cb10bb56f66922ae94e9dcf05b..a67cfc28a24928191e58708b8c9b7e694f9bec8b 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-09  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * wget.texi (Download Options): Add documentation for --backups.
+       (Wgetrc Commands): Add documentation for backups.
+       Reported by: Tomas Hozza <thozza@redhat.com>.
+
 2013-07-11  Tomas Hozza  <thozza@redhat.com>
 
        * wget.texi: Document --regex-type and --preserve-permissions.
 2013-07-11  Tomas Hozza  <thozza@redhat.com>
 
        * wget.texi: Document --regex-type and --preserve-permissions.
index 5054382ddf104cd2ccb31760403be6437150e573..7a1670efca2cea71897ea801a91e5b4a7f05c837 100644 (file)
@@ -630,6 +630,13 @@ Note that when @samp{-nc} is specified, files with the suffixes
 @samp{.html} or @samp{.htm} will be loaded from the local disk and
 parsed as if they had been retrieved from the Web.
 
 @samp{.html} or @samp{.htm} will be loaded from the local disk and
 parsed as if they had been retrieved from the Web.
 
+@cindex backing up files
+@item --backups=@var{backups}
+Before (over)writing a file, back up an existing file by adding a
+@samp{.1} suffix (@samp{_1} on VMS) to the file name.  Such backup
+files are rotated to @samp{.2}, @samp{.3}, and so on, up to
+@var{backups} (and lost beyond that).
+
 @cindex continue retrieval
 @cindex incomplete downloads
 @cindex resume download
 @cindex continue retrieval
 @cindex incomplete downloads
 @cindex resume download
@@ -2882,9 +2889,11 @@ enables it).
 Enable/disable saving pre-converted files with the suffix
 @samp{.orig}---the same as @samp{-K} (which enables it).
 
 Enable/disable saving pre-converted files with the suffix
 @samp{.orig}---the same as @samp{-K} (which enables it).
 
-@c @item backups = @var{number}
-@c #### Document me!
-@c
+@item backups = @var{number}
+Use up to @var{number} backups for a file.  Backups are rotated by
+adding an incremental counter that starts at @samp{1}.  The default is
+@samp{0}.
+
 @item base = @var{string}
 Consider relative @sc{url}s in input files (specified via the
 @samp{input} command or the @samp{--input-file}/@samp{-i} option,
 @item base = @var{string}
 Consider relative @sc{url}s in input files (specified via the
 @samp{input} command or the @samp{--input-file}/@samp{-i} option,
index c895c4eeb4e5de19dd13e4409dfc8d53245a9281..8ce0eb3ff252f47c26d824e3074ec29b113ea065 100644 (file)
@@ -714,6 +714,9 @@ Recursive download:\n"),
     N_("\
   -k,  --convert-links      make links in downloaded HTML or CSS point to\n\
                             local files.\n"),
     N_("\
   -k,  --convert-links      make links in downloaded HTML or CSS point to\n\
                             local files.\n"),
+    N_("\
+  --backups=N   before writing file X, rotate up to N backup files.\n"),
+
 #ifdef __VMS
     N_("\
   -K,  --backup-converted   before converting file X, back up as X_orig.\n"),
 #ifdef __VMS
     N_("\
   -K,  --backup-converted   before converting file X, back up as X_orig.\n"),