0 level ufsdump
#! /bin/csh # # Perform 0 level dump date mt -f /dev/rmt/ohbn status mt -f /dev/rmt/ohbn rewind echo "/data1" ufsdump 0fu /dev/rmt/0hbn /dev/rdsk/c0t1d0s0 echo "/data2" ufsdump 0fu /dev/rmt/0hbn /dev/rdsk/c0t2d0s0 mt -f /dev/rmt/ohbn rewind mt -f /dev/rmt/ohbn status mt -f /dev/rmt/ohbn offline # /dev/dsk/c0t1d0s0 /dev/rdsk/c0t1d0s0 /data1 ufs 2 yes - # /dev/dsk/c0t2d0s0 /dev/rdsk/c0t2d0s0 /data2 ufs 2 yes -
#! /bin/csh source /.source cd /www/tar rm www-stage.*.tar.gz toc.*.txt set date=`date +%m%d` tar -cf ./www-stage.$date.tar ../ext-root tar -tvf www-stage.$date.tar > toc.$date.txt & #gzip ./www-stage.$date.tar
#! /bin/csh source /.cshrc cd /data/backup rm ./www-stage.#.tar.gz toc.*.txt cp /www-stage/www-stage.*.tar.gz . cp /www-stage/toc.*.txt . ls -al .
#! /bin/csh source /.cshrc rsync -a --delete /www/* myhost:/www/ &
#!/bin/sh
DB=/users/dswkim/DATABANK
BACKUP=/data1
for dbfall in `find $DB -type f -print`
do
if [ ! -d `dirname $BACKUP/$dbfall` ]; then
mkdir -p `dirname $BACKUP/$dbfall`
fi
`cp -r $dbfall $BACKUP/$dbfall`
done
#!/bin/sh # # Incremental backup after the major backup # SOURCE=/users/dswkim/DATABANK BACKUP=/data1 cd $SOURCE; find . -type f -mtime -1 -print | tar cf - - | ( cd $BACKUP; tar xvf -)
backup_daily.sh backs up files daily, and each file is replaced every week.
#!/bin/csh -f set path=(/usr/bin) set y=`date` set day=$y[1] set file = cd /export/home/dswkim tar cf - * | compress -c > /backup/dswkim/dswkim.$day.tar.Z /usr/ucb/mail -s "Home Dir Backup" dswkim@dswkim.org < /dev/null