chiark / gitweb /
@@ -1,3 +1,9 @@
[chiark-utils.git] / backup / full
index a46726077e414ff1275606931562672a82b4024c..d4e5fcacd226599b8881c9abc48d41b89b51ea15 100755 (executable)
@@ -186,6 +186,7 @@ foreach $exc (@excl) {
 for $tf (@fsys) {
     printdate();
     parsefsys();
+    prepfsys();
 
     pipe(FINDOR,FINDOW) or die $!;
     pipe(DUMPOR,DUMPOW) or die $!;
@@ -221,6 +222,9 @@ for $tf (@fsys) {
         $dumpin = '<&FINDOR';
     } elsif ($tm eq 'ntfsimage') {
        $dumpcmd= "ntfsimage -svvf --dirty $dev";
+    } elsif ($tm eq 'gtar') {
+       execute("$rstr touch $fsidfile+new");
+       $dumpcmd= "tar Ccfl $atf - .";
     } else {
        die "unknown method $tm for $prefix:$atf\n";
     }
@@ -249,6 +253,12 @@ for $tf (@fsys) {
     push @tapefilesizes, [ $1, $currenttapefilename ];
     $totalrecords += $1;
     pboth("total blocks written so far: $totalrecords\n");
+
+    if ($tm eq 'gtar') {
+       execute("$rstr mv -f $fsidfile+new $fsidfile");
+    }  
+    
+    finfsys();
 }
 
 # The backup should now be complete; verify it