X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=blobdiff_plain;f=backup%2Fincrem;h=e3037e8068e10617447b20ddeb18e00f64d795dd;hp=b3c1f7019d57e2dd42feeb1fea506ecab926c2c0;hb=6548c05b2f401d9d712acde8d0aff31388c0db70;hpb=460e29f1c9232dafbdc161bf67d3e956d23eeb6b diff --git a/backup/increm b/backup/increm index b3c1f70..e3037e8 100755 --- a/backup/increm +++ b/backup/increm @@ -90,10 +90,23 @@ setstatus "PROBLEMS during incremental dump"; 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') { + + 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; @@ -101,10 +114,12 @@ for $tf (@fsys) { # Same trick as full uses to do a pipeline whilst keeping track # of all exit statuses: # dump /dev/null - startprocess '&DUMPOW',$rstr."dump 1bfu $softblocksizekb - $atf"; - startprocess '<&DUMPOR','>&BUFOW','writebuffer'; - startprocess '<&BUFOR','>/dev/null' - ,"dd ibs=$softblocksizebytes obs=$blocksizebytes of=$ntape"; + startprocess '&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