X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=backup%2Fincrem;h=57a037dc31cadce80345a60b3cc5395a24a6563e;hb=3a2cfb6ea202d848ce2baa688f33620035f745d0;hp=bc058f7f7ffe0f44c1bf0300eb92696448f5382b;hpb=314a202a6f4e0a120fd982ad0398cdf507d6219d;p=chiark-utils.git diff --git a/backup/increm b/backup/increm index bc058f7..57a037d 100755 --- a/backup/increm +++ b/backup/increm @@ -61,25 +61,26 @@ close A or die $!; # better be a decimal number $advance =~ m/^\d+$/ or die "$advance ?"; +# Get a list of all filesystems +readfsys('all'); +openlog(); + # Rewind the tape and if we are the first incremental on the tape then # write the TAPEID record, otherwise skip forward to the correct point. # (full will already have checked that this is the right tape before # it invoked us, so no need to read the existing TAPEID record first.) -system "mt -f $ntape rewind"; $? and die $?; +runsystem("mt -f $ntape rewind"); if ($advance == 1) { writetapeid($tapeid,$tapedesc); } else { - system "mt -f $ntape fsf $advance"; $? and die $?; - $currenttapefilenumber= $advance+1; + runsystem("mt -f $ntape fsf $advance"); + $currenttapefilenumber= $advance; } -# Get a list of all filesystems -readfsys('all'); -openlog(); - sub closepipes () { close(DUMPOR); close(BUFOR); close(DUMPOW); close(BUFOW); + close(GZOR); close(GZOW); } setstatus "PROBLEMS during incremental dump"; @@ -128,7 +129,7 @@ for $tf (@fsys) { } # Rewind the tape, and increment the counter of incremental backups. -system "mt -f $tape rewind"; $? and die $?; +runsystem("mt -f $tape rewind"); open IAN,">increm-advance.new" or die $!; print IAN "$advance\n" or die $!; close IAN or die $!;