printdate();
unlink 'TAPEID';
+system "mt -f $tape rewind"; $? and die $?;
system "mt -f $tape setblk $blocksizebytes"; $? and die $?;
system "dd if=$tape bs=${blocksize}b count=10 | tar -b$blocksize -vvxf - TAPEID";
die "Tape $tapeid same as last time.\n" if $tapeid eq $lasttape;
+if (defined($tapedesc= readlink "$etc/tape.$tapeid")) {
+ $tapedesc =~ s/^.*\.//;
+ $tapedesc .= "($tapeid)";
+} else {
+ $tapedesc = $tapeid;
+}
+
undef $fsys;
open D, "$etc/tape.$tapeid" or die "Unknown tape $tapeid ($!).\n";
for (;;) {
if defined($next) || defined($fsys);
print STDERR "Incremental tape $tapeid.\n\n";
setstatus "FAILED during incremental startup";
- exec "increm $tapeid";
+ exec "increm",$tapeid,$tapedesc;
die $!;
}
readfsys("$fsys");
openlog();
-$doing= "dump of $fsys to tape $tapeid in drive $tape";
+$doing= "dump of $fsys to tape $tapedesc in drive $tape";
print LOG "$doing:\n" or die $!;
-system "mt -f $tape rewind"; $? and die $?;
-system "mt -f $tape retension"; $? and die $?;
-
open T, ">TAPEID" or die $!;
-print T "$tapeid\n" or die $!;
+print T "$tapeid\n$tapedesc\n" or die $!;
close T or die $!;
system "tar -b$blocksize -vvcf TAPEID.tar TAPEID"; $? and die $?;
print "$doing completed.\nNext dump tape is $next.\n" or die $!;
-setstatus "Successful ($tapeid $fsys, next $next)";
+setstatus "Successful: $tapedesc $fsys, next $next";
exit 0;