Option to just update tar archives

This commit is contained in:
Jamie Cameron
2008-02-02 22:21:27 +00:00
parent 029d399726
commit c6eb12e3f2
4 changed files with 21 additions and 1 deletions

View File

@@ -27,3 +27,5 @@ Added an option for setting the path to the remote rmt command for tar format ba
On Linux and BSD systems, backups and restores in TAR or EXT formats can be done via FTP as well as SSH, RSH and to local files.
---- Changes since 1.320 ----
Added a warning if % is used in filenames but strftime substition is not enabled.
---- Changes since 1.390 ----
When making tar format backups on Linux, an option to just append new files to the archive instead of over-writing it is available.

View File

@@ -0,0 +1,8 @@
<header>Just add new files to archive?</header>
When this is set to <b>No</b> (as it is by default), the backup destination
will be replaced with an archive of all files currently in the source directories. But if you select <b>Yes</b>, only files that have been changed since the
archive was create will be appended to it. This is useful when making incremental backups. However, it cannot be used with compressed or remote archives. <p>
<footer>

View File

@@ -87,11 +87,13 @@ dump_gzip1=Yes, with gzip
dump_gzip2=Yes, with bzip
dump_bcomp=Buffer compressed data into blocks?
dump_xdev=Limit backup to one filesystem?
dump_update=Just add new files to archive?
dump_notape=Prompt for new tape if needed?
dump_rmt=Path to <tt>rmt</tt> on remote system
dump_links=Follow symbolic links?
dump_egzip=The gzip compression option is incompatible with the tape size option
dump_egzip2=The gzip compression option is incompatible with the multi-file backup option
dump_egzip3=The gzip compression option is incompatible with the option to just add new files to the archive
dump_emulti=Multi-file backups cannot be done to a tape device
dump_emulti2=Multi-file backups cannot be done to a remote server
dump_ermt=Missing or invalid path to <tt>rmt</tt> program

View File

@@ -91,6 +91,10 @@ if ($_[0]->{'fs'} eq 'tar') {
&ui_radio("notape", int($_[0]->{'notape'}),
[ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ]),
1, $tds);
print &ui_table_row(&hlink($text{'dump_update'},"tarupdate"),
&ui_yesno_radio("update", int($_[0]->{'update'})),
1, $tds);
}
elsif ($_[0]->{'fs'} eq 'xfs') {
# Display xfs dump options
@@ -225,6 +229,10 @@ if ($_[0]->{'fs'} eq 'tar') {
$_[0]->{'multi'} = $in{'multi'};
$_[0]->{'links'} = $in{'links'};
$_[0]->{'xdev'} = $in{'xdev'};
$_[0]->{'update'} = $in{'update'};
if ($in{'gzip'} && $in{'update'}) {
&error($text{'dump_egzip3'});
}
if ($in{'multi'}) {
!-c $in{'file'} && !-b $in{'file'} ||
&error($text{'dump_emulti'});
@@ -321,7 +329,7 @@ local $tapecmd = $_[0]->{'multi'} && $_[0]->{'fs'} eq 'tar' ? $multi_cmd :
local @dirs = split(/\s+/, $_[0]->{'dir'});
if ($_[0]->{'fs'} eq 'tar') {
# tar format backup
$cmd = "tar -c $flag";
$cmd = "tar ".($_[0]->{'update'} ? "-u" : "-c")." ".$flag;
$cmd .= " -V '$_[0]->{'label'}'" if ($_[0]->{'label'});
$cmd .= " -L $_[0]->{'blocks'}" if ($_[0]->{'blocks'});
$cmd .= " -z" if ($_[0]->{'gzip'} == 1);