# $HeadURL$ $LastChangedRevision$ ############################################################################### # # This section describes what backups backup what - this is just for the user # # id host description # # The host should not matter ############################################################################### choice: leda leda leda (OS) choice: dione dione dione (OS, /usr/server, homes, SVN) choice: archive dione archive (combined) choice: arc1 dione archive (part 1/4: mirrors) choice: arc2 dione archive (part 2/4: the sopranos) choice: arc3 dione archive (part 3/4: rest of videos) choice: arc4 dione archive (part 4/4: rest of archive) choice: test .* test backup ('touch /tmp/q{1,2}' to use) ############################################################################### # # This section describes what backups backup what and how # # id data user method path ############################################################################### backup: leda leda root dump / backup: dione dione root dump / backup: dione dione root tar /diska/usr-server backup: dione dione root tar /diska/home backup: dione dione root tar /diska/svn-repos backup: dione dione root tar /diska/svn-repos.passwd backup: archive dione root chunker /diskb/pub backup: test localhost SELF tar /tmp/q1 backup: test localhost SELF tar /tmp/q2 ############################################################################### # # This section describes the various backup methods # # id command ############################################################################### method: dump /sbin/dump 0fb - `backup --block-size-translator dump BLOCK_SIZE` DATA_PATHS method: tar tar cbf `backup --block-size-translator tar BLOCK_SIZE` - DATA_PATHS # '$CHUNK_ID' is an attempt to read CHUNK_ID from the environment. It'll be # set be the user on the command line; e.g. "CHUNKER_ID=2 backup -v ...." and # backup should just not touch it, but put it into the method. If backup fails # to evaluate it then I'll hack chunker to read it directly from the environment. method: chunker tar cbf `backup --block-size-translator tar BLOCK_SIZE` - `/home/alexis/dev/svnwcs/backup/bin/chunker \ -d 10 BACKUP_ID MEDIA_SIZE $CHUNK_ID DATA_PATHS` #method: cpio find DATA_PATHS -depth | cpio -oB | \ # DATA_REMSH_CMD TAPE_HOST -l TAPE_USER dd obs=5k of=TAPE_NDEV # #method: smbtar PATH=$PATH:/usr/local/bin; \ # smbtar -s DATAHOST -x DATA_PATHS -p PASSWORD \ # -t TAPE_USER@TAPE_HOST:TAPE_NDEV # #method: tarfs gtar clf - DATA_PATHS | \ # DATA_REMSH_CMD TAPE_HOST -l TAPE_USER dd obs=10k of=TAPE_NDEV # #method: afio find DATA_PATHS -depth | afio -o -c 1024 -v -z -Z | # DATA_REMSH_CMD TAPE_HOST -l TAPE_USER dd obs=UNKNOWN of=TAPE_NDEV ############################################################################### # # This section describes the various ways to determine the size of a backup # # id command ############################################################################### # Attempting here to get first word without using '$' or tabs, which # are getting mangled somewhere along the line. Sheesh! I'll have to # fix this in backup, so it'll take any command. This is crazy! # (couldn't even use 'head' instead of 'sed -n 1p' because it exits # before the xargs and xargs gets a SIGPIPE, which we see.) #size: tar [ -r DATA_PATH ] && du -sk DATA_PATH | { T=0; while read S P; do T=`expr $T + $S`; done; echo $T; } # Chunker doesn't use sizes, so we fake it. size: chunker \ echo 0 # don't pipe du output direct to the summing loop or we lose 'du' exit code # and so 'backup' can't stop if it fails. size: tar du -sk DATA_PATH > /tmp/du.$$; RC=$?; \ { T=0; while read S P; do T=`expr $T + $S`; done; echo $T; } < /tmp/du.$$; \ rm /tmp/du.$$; \ [ $RC = 0 ] #size: tar1mbs du -sk DATA_PATH | { T=0; while read S P; do T=`expr $T + $S`; done; echo $T; } size: dump [ -r DATA_PATH ] && df DATA_PATH | { read H; T=0; while read F C U A P M; do T=`expr $T + $U`; done; echo $T; } ############################################################################### # # This section describes the various verify methods # # Note: be careful that the verify doesn't soak up stdin, or only the # first of multiple backups will run. # # id command ############################################################################### #verify: sdump RSH=DATA_REMSH_CMD /sbin/restore rNvf TAPE_USER@TAPE_HOST:TAPE_NDEV verify: dump /sbin/restore rNvfb - `backup --block-size-translator dump BLOCK_SIZE` verify: chunker tar tvbf `backup --block-size-translator tar BLOCK_SIZE` - verify: tar tar tvbf `backup --block-size-translator tar BLOCK_SIZE` - #verify: tar1mbs DATA_REMSH_CMD TAPE_HOST -l TAPE_USER -n dd ibs=1024k \ # if=TAPE_NDEV | tar tvbf 2048 - # #verify: ufsdump ufsrestore tf TAPE_USER@TAPE_HOST:TAPE_NDEV # #verify: cpio cpio -itvBF TAPE_USER@TAPE_HOST:TAPE_NDEV # #verify: smbtar DATA_REMSH_CMD TAPE_HOST -l TAPE_USER -n dd ibs=10k \ # if=TAPE_NDEV | tar tvbf 20 - # #verify: tarfs gtar tvf TAPE_USER@TAPE_HOST:TAPE_NDEV # #method: afio afio -o -c 1024 -v -z -Z TAPE_USER@TAPE_HOST:TAPE_NDEV ############################################################################### # # This section describes the device we use (note only one entry) # # thishost@ tapehost rewind no-rewind user ############################################################################### device: te35 media3 /dev/rmt/1m /dev/rmt/1mn ahuxley device: (dione|leda) dione /dev/st0 /dev/nst0 SELF