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";
for $tf (@fsys) {
printdate();
parsefsys();
+ prepfsys();
pipe(FINDOR,FINDOW) or die $!;
pipe(DUMPOR,DUMPOW) or die $!;
$ddcmd .= " conv=sync";
}
- nexttapefile("full $prefix:$atf");
+ nexttapefile("full $prefix:$atf_print");
# We can back up via dump or cpio or zafio
$dumpin= '</dev/null';
if ($tm eq 'dump') {
- $dumpcmd= "dump 0bfu $softblocksizekb - $atf";
+ $dumplabel= $pcstr.$atf_print.'$';
+ $dumpcmd= "dump 0Lbfu $dumplabel $softblocksizekb - $atf";
} elsif ($tm eq 'cpio') {
startprocess '</dev/null','>&FINDOW',$rstr."find $atf -xdev -noleaf -print0";
$dumpcmd= "cpio -Hustar -o0C$softblocksizebytes";
$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.
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