g wrote:
Thank you g! this looks like fun. I'm going to try this and see what happens. I've been doing all the backup to scsi tape using tar before this.Mark Weaver wrote:Hi List,Maybe I've been hackin at this a wee bit too long, but I just can't seem to figure out why this command isn't performing just the way its supposed.Any ideas...comments...epiphanies?marry new year, mark. i pass along next following. do not recall where came from before i added to my tape script collection and made minor 'save space' edits. *** thad phetteplace, claims, for a 'level' back up ::: #!/bin/sh # backups.sh - simple backup script, by Thad Phetteplace # put in /usr/local/bin as 'backups.sh', permission = 700 (-rwx------). # manually back up, usage 'backups.sh [dumplevel]' # script takes one parameter, dump level. # if no dump level provided, set zero. # level zero (full) dump, rewinds and ejects tape when done. if [ $1 ]; then level=$1 else # dump level not provided, set zero level="0" fi /sbin/dump $level -u -f dev/nrft0 / /sbin/dump $level -u -f dev/nrft0 /home /sbin/dump $level -u -f dev/nrft0 /var /sbin/dump $level -u -f dev/nrft0 /usr # if full dump, rewind, eject tape when done. if [ $level = "0" ]; then /bin/mt -f /dev/ntft0 rewind # /bin/st if SCSI tape /bin/mt -f /dev/ntft0 offline # /bin/st if SCSI tape fi *** crontab backup, ie., 0 22 * * 0 /usr/local/bin/backup.sh 0 0 22 * * 1 /usr/local/bin/backup.sh 9 0 22 * * 2 /usr/local/bin/backup.sh 8 0 22 * * 3 /usr/local/bin/backup.sh 7 and so on..... *** *** for my tr4 scsi tape, i use; =+= command line tape backup, quick, easy, no special programs. create: link from _tape_device_ to '/dev/tape'. cd to top directory of path to back up when doing write. this way, when you restore, you may restore files were ever you wish, as '/' is never implied. 'grep -iv "\./proc"' eliminates '/proc' from path '/' write, full backup; [w/ 5120 byte record] find . -print | grep -iv "\./proc" | sort | \ cpio -oaBcv -O /dev/tape write, modified; [1 day old] find . -mtime 1 -type f -print | cpio -oaBcv -O /dev/tape restore, all; cpio -iBcdlmv -I /dev/tape restore, file; echo "path-filename" | cpio -iBcdlmv -I /dev/tape view, names of files stored; [build index file] cpio -iBct -I /dev/tape [ > bkup.indx ] or, for 'ls -l' type output; cpio -iBctv -I /dev/tape [ > bkup.indx ] cron; 30 01 * * * find / -print | grep -iv "\./proc" | \ sort | cpio -oaBcv -O /dev/tape cron; 30 01 * * * 'script-file' [where 'script-file' is any combination of _write_.] test write script path; find . -print | grep -iv "\./proc" | sort > test4files less test4files more help; man cpio cron find grep less sort why cpio? cpio is available on all systems, as is tar. cpio will span multiple tapes, as will tar. cpio will skip bad data and tell you, tar may not. =+= enjoy. peace out. tc,hago. g . -- think green... save a tree, save a life, save time, save bandwidth, save storage. send email... text/plain - disable pgp/gpg/geek code =+= beauty of real is revealed only to those who persevere. old orthodox saying. =+= may God bless, and have mercy | take care, have a good one slaying dragons | linux + firewalls + wrappers + spoof = fence to gates =+= if you are proud to be an american, then buy "made in america".
Mark
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
