From d1b0cf6453e5562e8b1693390f32c7f45aab7cc9 Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Sun, 7 Oct 2001 16:44:26 +0000 Subject: [PATCH] As found on chiark in /usr/local/lib/backup and /etc/backup: chiark's config and crapper prefix handling; not for trunk. --- backup/backuplib.pl | 3 --- backup/checkallused | 27 ++++-------------------- backup/expected-diffs | 9 +++----- backup/fsys.all | 48 ++++++------------------------------------- backup/fsys.pt0 | 25 ++-------------------- backup/fsys.pt1 | 26 +++-------------------- backup/tape.506 | 3 +++ backup/tape.507 | 3 +++ backup/tape.508 | 3 +++ backup/tape.509 | 3 +++ backup/tape.510 | 2 ++ backup/tape.512 | 2 ++ backup/tape.515 | 3 +++ backup/tape.517 | 2 ++ backup/tape.519 | 3 +++ backup/tape.a0 | 3 +++ backup/tape.b0 | 3 +++ backup/tape.b1 | 3 +++ backup/tape.c0 | 3 +++ backup/tape.c1 | 3 +++ backup/tape.d0 | 3 +++ backup/tape.d1 | 3 +++ backup/tape.ka | 2 ++ backup/tape.kb | 2 ++ backup/warnings. | 5 +---- backup/was-tape.iw | 2 ++ 26 files changed, 70 insertions(+), 124 deletions(-) create mode 100644 backup/tape.506 create mode 100644 backup/tape.507 create mode 100644 backup/tape.508 create mode 100644 backup/tape.509 create mode 100644 backup/tape.510 create mode 100644 backup/tape.512 create mode 100644 backup/tape.515 create mode 100644 backup/tape.517 create mode 100644 backup/tape.519 create mode 100644 backup/tape.a0 create mode 100644 backup/tape.b0 create mode 100644 backup/tape.b1 create mode 100644 backup/tape.c0 create mode 100644 backup/tape.c1 create mode 100644 backup/tape.d0 create mode 100644 backup/tape.d1 create mode 100644 backup/tape.ka create mode 100644 backup/tape.kb create mode 100644 backup/was-tape.iw diff --git a/backup/backuplib.pl b/backup/backuplib.pl index d412c94..5803a9f 100644 --- a/backup/backuplib.pl +++ b/backup/backuplib.pl @@ -53,9 +53,6 @@ sub readfsys ($) { if (m/^prefix\s+(\w+)\s+(\S.*\S)$/) { $prefix{$1}= $2; next; - } elsif (m/^prefix\-df\s+(\w+)\s+(\S.*\S)$/) { - $prefixdf{$1}= $2; - next; } push @fsys,$_; } diff --git a/backup/checkallused b/backup/checkallused index fd613f3..600fb88 100755 --- a/backup/checkallused +++ b/backup/checkallused @@ -38,8 +38,6 @@ for $fsg (sort keys %fsgdone) { for $tf (@fsys) { parsefsys(); $pstr= $prefix ne '' ? "$prefix:$atf" : $atf; - &e("dumped twice ($backed{$pstr}, $fsg): $pstr") - if defined $backed{$pstr}; $backed{$pstr}= $fsg; print " $pstr"; } @@ -59,36 +57,19 @@ print "\n"; for $pfx ('', sort keys %prefix) { $rstr= length($pfx) ? $prefix{$pfx}.' ' : ''; - $dfstr= exists($prefixdf{$pfx}) ? $prefixdf{$pfx} : - 'df --no-sync -xiso9660 -xnfs -xproc'; - $cmd= "$rstr $dfstr"; - open X, "$cmd |" or die $!; - $_= ; m/^Filesystem/ or die "$cmd => $_ ?"; + open X, $rstr." df --no-sync -xnfs |" or die $!; + $_= ; m/^Filesystem/ or die "$_ ?"; $ppstr= length($pfx) ? $pfx : ''; $pstr= length($pfx) ? "$pfx:" : ''; print "mount points: $ppstr:"; while () { chomp; - next if m,^procfs\s,; m,^/dev/(\S+)\s.*\s(/\S*)\s*$, or die "$_ ?"; - ($dev,$mp) = ($1,$2); - $mounted{"$pstr$mp"}="$pstr$dev"; print " $1-$2"; - if (defined($backto= $backed{"$pstr$mp"})) { - if (m,^/dev/\S+\s+\d+\s+(\d+)\s,) { - $usedkb{$backto} += $1; - } else { - $usedkb{$backto} += 0; - $unkkb{$backto} .= " + $pstr$mp"; - } - } + $mounted{"$pstr$2"}="$pstr$1"; print " $1-$2"; } print "\n"; - $!=0; close(X); $? and die "$cmd $? $!"; -} - -foreach $fsg (keys %usedkb) { - print "filesystem group $fsg: $usedkb{$fsg} 1K-blocks$unkkb{$fsg}\n"; } +$!=0; close(X); $? and die "$? $!"; open Z,"$etc/expected-diffs" or die $!; for (;;) { diff --git a/backup/expected-diffs b/backup/expected-diffs index 5609903..644ef8b 100644 --- a/backup/expected-diffs +++ b/backup/expected-diffs @@ -1,7 +1,4 @@ -#!sfere:/opt/bigdisc -!davenant:/export/mirror -davenant:/export/mirror/work -!davenant:/export/mp3 -!kadath:/tmp -#!elmyra:/mnt/fat/data +/var/spool/news/chiark +!/var/spool/news +!/tmp end diff --git a/backup/fsys.all b/backup/fsys.all index 26b8a9c..dd9139e 100644 --- a/backup/fsys.all +++ b/backup/fsys.all @@ -1,44 +1,8 @@ -# - -prefix davenant ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' davenant 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' -prefix xenophobe ssh -o 'BatchMode yes' -c blowfish -o 'Compression no' xenophobe 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' - -prefix khem ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' -o 'CompressionLevel 1' khem 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' - -prefix kadath ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' -o 'CompressionLevel 1' kadath -l ian 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH really' -prefix-df kadath /bin/df -t noprocfs,nfs -# - -/usr/src dump davenant - -/var dump davenant -/u dump davenant / dump - -/ dump davenant - -/export/mirror/work cpio davenant - -/usr dump davenant -/boot dump davenant -# - -/ dump kadath - -/usr dump kadath -/var dump kadath -/home dump kadath - -/var dump khem -/home dump khem -/ dump khem - -/usr dump khem -# - -/ dump xenophobe - -/dos/c cpio -/dos/d cpio - +/var dump +/var/log dump +/u dump +/u2 dump +/usr dump +/var/spool/news/chiark cpio end diff --git a/backup/fsys.pt0 b/backup/fsys.pt0 index f14c114..1412887 100644 --- a/backup/fsys.pt0 +++ b/backup/fsys.pt0 @@ -1,25 +1,4 @@ -# - -prefix davenant ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' davenant 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' -prefix xenophobe ssh -o 'BatchMode yes' -c blowfish -o 'Compression no' xenophobe 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' - -prefix khem ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' -o 'CompressionLevel 1' khem 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' - -prefix kadath ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' -o 'CompressionLevel 1' kadath -l ian 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH really' -prefix-df kadath /bin/df -t noprocfs,nfs -# - -/usr/src dump davenant - -/var dump davenant -/u dump davenant / dump - -/ dump davenant - -/export/mirror/work cpio davenant - -/usr dump davenant -/boot dump davenant - +/var dump +/u dump end diff --git a/backup/fsys.pt1 b/backup/fsys.pt1 index e1118b3..6afe7ef 100644 --- a/backup/fsys.pt1 +++ b/backup/fsys.pt1 @@ -1,24 +1,4 @@ -# - -prefix davenant ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' davenant 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' -prefix xenophobe ssh -o 'BatchMode yes' -c blowfish -o 'Compression no' xenophobe 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' - -prefix khem ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' -o 'CompressionLevel 1' khem 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH' - -prefix kadath ssh -o 'BatchMode yes' -c blowfish -o 'Compression yes' -o 'CompressionLevel 1' kadath -l ian 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:$PATH really' -prefix-df kadath /bin/df -t noprocfs,nfs -# - -/ dump kadath - -/usr dump kadath -/var dump kadath -/home dump kadath - -/var dump khem -/home dump khem -/ dump khem - -/usr dump khem - +/u2 dump +/usr dump +/var/spool/news/chiark cpio end diff --git a/backup/tape.506 b/backup/tape.506 new file mode 100644 index 0000000..219e728 --- /dev/null +++ b/backup/tape.506 @@ -0,0 +1,3 @@ +filesystems all +next b0 +end diff --git a/backup/tape.507 b/backup/tape.507 new file mode 100644 index 0000000..9b0d81f --- /dev/null +++ b/backup/tape.507 @@ -0,0 +1,3 @@ +filesystems all +next c0 +end diff --git a/backup/tape.508 b/backup/tape.508 new file mode 100644 index 0000000..cb23647 --- /dev/null +++ b/backup/tape.508 @@ -0,0 +1,3 @@ +filesystems all +next d0 +end diff --git a/backup/tape.509 b/backup/tape.509 new file mode 100644 index 0000000..6fbdc69 --- /dev/null +++ b/backup/tape.509 @@ -0,0 +1,3 @@ +filesystems all +next a0 +end diff --git a/backup/tape.510 b/backup/tape.510 new file mode 100644 index 0000000..cad1fa7 --- /dev/null +++ b/backup/tape.510 @@ -0,0 +1,2 @@ +incremental +end diff --git a/backup/tape.512 b/backup/tape.512 new file mode 100644 index 0000000..cad1fa7 --- /dev/null +++ b/backup/tape.512 @@ -0,0 +1,2 @@ +incremental +end diff --git a/backup/tape.515 b/backup/tape.515 new file mode 100644 index 0000000..9b0d81f --- /dev/null +++ b/backup/tape.515 @@ -0,0 +1,3 @@ +filesystems all +next c0 +end diff --git a/backup/tape.517 b/backup/tape.517 new file mode 100644 index 0000000..cad1fa7 --- /dev/null +++ b/backup/tape.517 @@ -0,0 +1,2 @@ +incremental +end diff --git a/backup/tape.519 b/backup/tape.519 new file mode 100644 index 0000000..9b0d81f --- /dev/null +++ b/backup/tape.519 @@ -0,0 +1,3 @@ +filesystems all +next c0 +end diff --git a/backup/tape.a0 b/backup/tape.a0 new file mode 100644 index 0000000..219e728 --- /dev/null +++ b/backup/tape.a0 @@ -0,0 +1,3 @@ +filesystems all +next b0 +end diff --git a/backup/tape.b0 b/backup/tape.b0 new file mode 100644 index 0000000..9b0d81f --- /dev/null +++ b/backup/tape.b0 @@ -0,0 +1,3 @@ +filesystems all +next c0 +end diff --git a/backup/tape.b1 b/backup/tape.b1 new file mode 100644 index 0000000..0eab3f9 --- /dev/null +++ b/backup/tape.b1 @@ -0,0 +1,3 @@ +filesystems pt1 +next c0 +end diff --git a/backup/tape.c0 b/backup/tape.c0 new file mode 100644 index 0000000..cb23647 --- /dev/null +++ b/backup/tape.c0 @@ -0,0 +1,3 @@ +filesystems all +next d0 +end diff --git a/backup/tape.c1 b/backup/tape.c1 new file mode 100644 index 0000000..44f2b50 --- /dev/null +++ b/backup/tape.c1 @@ -0,0 +1,3 @@ +filesystems pt1 +next d0 +end diff --git a/backup/tape.d0 b/backup/tape.d0 new file mode 100644 index 0000000..6fbdc69 --- /dev/null +++ b/backup/tape.d0 @@ -0,0 +1,3 @@ +filesystems all +next a0 +end diff --git a/backup/tape.d1 b/backup/tape.d1 new file mode 100644 index 0000000..4856464 --- /dev/null +++ b/backup/tape.d1 @@ -0,0 +1,3 @@ +filesystems pt1 +next a0 +end diff --git a/backup/tape.ka b/backup/tape.ka new file mode 100644 index 0000000..cad1fa7 --- /dev/null +++ b/backup/tape.ka @@ -0,0 +1,2 @@ +incremental +end diff --git a/backup/tape.kb b/backup/tape.kb new file mode 100644 index 0000000..cad1fa7 --- /dev/null +++ b/backup/tape.kb @@ -0,0 +1,2 @@ +incremental +end diff --git a/backup/warnings. b/backup/warnings. index d42696b..3e35aa6 100755 --- a/backup/warnings. +++ b/backup/warnings. @@ -1,4 +1 @@ -T 300 "in 10 minutes" -T 240 "in 5 minutes" -T 45 "in 1 minute" -T 15 "in 15 seconds" +T 300 "in 5 minutes" diff --git a/backup/was-tape.iw b/backup/was-tape.iw new file mode 100644 index 0000000..cad1fa7 --- /dev/null +++ b/backup/was-tape.iw @@ -0,0 +1,2 @@ +incremental +end -- 2.30.2