At 17:14 19/11/01 +0000, you wrote:
>The standard Unix tool for automating jobs is cron. You could set up cron
>to run the tar command that you normally use. See man cron for details ;)
>
>Ben Thorp
tar is more than adequate for most backup purposes.
If you really want to be fussy, you should probably set up tar in a script
to do the backups. Remember to always verify the backups too and check for
errors from the process.
For robustness it is better to use compression on the drive (see `man mt`
or set the dip switch on the drive) and not use the 'z' or 'Z' flags with
tar (as the un-compression program does not cope well with damaged
files). I've been told that the 'best' way to use tar is to compress each
file then pass it through ecc (a program to add an error correcting code)
then write it to the tar archive - but I've not:
1) worked out how to pre-process files with tar
2) where to find a copy of ecc for linux.
(but I'm sure someone will tell me).
Note that you probably don't want to backup /dev and /proc. Also remember
if you restore your kernel image you need to re-run lilo.
If you use cpio for your backups, then you can use 'find' to get a file
list which is quite cool for incremental / selective backups. e.g.
find /home /etc -xdev -newer /var/log/lastbackup | cpio -oBc > /dev/st0
(thinking about it, you could probably do the with tar too). Performing
backups across more than one tape can be tricky with cpio/tar. As can
putting more than one backup on the same tape.
The most important thing about backups is to...
CHECK THAT YOU CAN RESTORE ALL THE DATA
---------------------------------------
As Ben said - schedule your jobs with cron. (NB my RH box at home decided
to install a version of cron which 'catches up' with stuff it missed while
switched off which is incredibly annoying). e.g.
0 5 * * mon-sat /etc/bkup
would run a script in /etc/bkup on monday,tues,wed,thurs,fri and saturday
mornings at 5 am to backup your system. If you can accomodate your whole
system on a single tape (AIR 24Gb on a DDS3), I would advise against
incremental backups - unless you need high levels of uptime, they are an
unnecessary complication.
HTH
Colin
--------------------------------------------------------------------
http://www.lug.org.uk http://www.linuxportal.co.uk
http://www.linuxjob.co.uk http://www.linuxshop.co.uk
--------------------------------------------------------------------