# includes ID and function).
BEGIN {
- $etc= '/etc/backup';
+ $etc= '/etc/chiark-backup';
require "$etc/settings.pl";
require 'backuplib.pl';
}
for $tf (@fsys) {
+ parsefsys();
+
+ $bufir='DUMPOR';
+ $ddcmd= "$nasty dd ibs=$softblocksizebytes obs=$blocksizebytes of=$ntape";
+
pipe(DUMPOR,DUMPOW) or die $!;
pipe(BUFOR,BUFOW) or die $!;
- parsefsys();
- if ($tm ne 'dump') {
+
+ $gz= $gzi if length $gzi;
+ if ($gz) {
+ $bufir='GZOR';
+ pipe(GZOR,GZOW) or die $!;
+ $ddcmd .= " conv=sync";
+ }
+
+ if ($tm eq 'dump') {
+ $dumpcmd= "dump 1bfu $softblocksizekb - $atf";
+ } else {
print "Not dumping $atf ($prefix) - not \`dump'.\n" or die $!;
print LOG "Not dumping $atf ($prefix) - not \`dump'.\n" or die $!;
next;
# Same trick as full uses to do a pipeline whilst keeping track
# of all exit statuses:
# dump </dev/null | writebuffer | dd >/dev/null
- startprocess '</dev/null','>&DUMPOW',$rstr."dump 1bfu $softblocksizekb - $atf";
- startprocess '<&DUMPOR','>&BUFOW','writebuffer';
- startprocess '<&BUFOR','>/dev/null'
- ,"dd ibs=$softblocksizebytes obs=$blocksizebytes of=$ntape";
+ startprocess '</dev/null','>&DUMPOW',"$nice ".$rstr.$dumpcmd;
+ if ($gz) {
+ startprocess '<&DUMPOR','>&GZOW',"$nice gzip -v$gz";
+ }
+ startprocess "<&$bufir",'>&BUFOW',"$nasty writebuffer";
+ startprocess '<&BUFOR','>/dev/null',"$nasty $ddcmd";
closepipes();
endprocesses();
# advance is a file counter, so it needs to be updated for each