X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=blobdiff_plain;f=backup%2Ffull;h=fffbb1ace16bb2dd2cbf30342e0bbf543ef9ac45;hp=9c603b9affbf80b9cd75b4f1b6cbbd557388d04e;hb=83d48f5254c0d9c7e3cbeaaec33459bb8398638f;hpb=7d4185f54b99fef18f8661ea1d5974171f997f1e diff --git a/backup/full b/backup/full index 9c603b9..fffbb1a 100755 --- a/backup/full +++ b/backup/full @@ -161,7 +161,7 @@ unlink 'this-md5sums'; print "Doing $doing ...\n" or die $!; unlink 'p'; -system 'mknod p p'; $? and die $?; +system 'mknod -m600 p p'; $? and die $?; setstatus "FAILED during dump"; @@ -204,12 +204,13 @@ for $tf (@fsys) { $ddcmd .= " conv=sync"; } - nexttapefile("full $prefix:$atf"); + nexttapefile("full $prefix:$atf_print"); # We can back up via dump or cpio or zafio $dumpin= '&FINDOW',$rstr."find $atf -xdev -noleaf -print0"; $dumpcmd= "cpio -Hustar -o0C$softblocksizebytes"; @@ -222,8 +223,11 @@ 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"; + die "unknown method $tm for $prefix:$atf_print\n"; } # This is a funky way of doing a pipeline which pays attention # to the exit status of all the commands in the pipeline. @@ -251,6 +255,10 @@ for $tf (@fsys) { $totalrecords += $1; pboth("total blocks written so far: $totalrecords\n"); + if ($tm eq 'gtar') { + execute("$rstr mv -f $fsidfile+new $fsidfile"); + } + finfsys(); }