[KLUG Members] IDE tape drives...

Kevin DeGraaf members@kalamazoolinux.org
Mon, 27 Aug 2001 11:10:38 -0400 (EDT)


> If you could send along your scripts I'd be greatful. I've never done
> tape based backups on Linux so I could use the jump start / erperience
> of others!

In crontab:

0 2 * * Tue-Sat /root/make_backup &

The backup script itself:

#!/bin/bash

# Kevin DeGraaf <kevin@kevindegraaf.net>

/bin/mt -f /dev/ht0 erase

/bin/tar cvPpWf /dev/ht0 \
         /etc /var/named /home \
         /usr/local/mysql/var \
         /usr/local/pgsql/var \
         > /root/backup/backup-log-`date +"%a_%b_%d_%Y_%H_%M"` \
         2> /root/backup/backup-error-`date +"%a_%b_%d_%Y_%H_%M"`

# restoration:
#  mt -f /dev/ht0 retension
#  tar xvPpf /dev/ht0 <files>

-------------
Kevin DeGraaf
http://www.kevindegraaf.net/