Link to home
Start Free TrialLog in
Avatar of pwstrain
pwstrain

asked on

Cron and Tar backup (Easy Question)

I want to backup using TAR from CRON nightly, but want to make sure the tape is formatted first. (RedHat 7.0)
I can tar manually with no problems, etc. Just can't figure how to erase the stupid tape! I'd prefer not to mess with Amanda or other backup utils. This is a simple single server environment backup up 300mb or so of Samba shares.
ASKER CERTIFIED SOLUTION
Avatar of newmang
newmang

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jlevie
jlevie

Using tar should be okay for the user data directories, but it isn't suitable as a generalized system backup utility. A much better choice would be to use dump as it knows how to handle all of the special file types. And as a bonus you can do interactive restores from a dump tape (directory browsing, individual files/dirs selections).

BTW: It isn't necessary to erase the tape each time before use. Just make sure that the tape is positioned at the beginning of media (mt -f /dev/tape-dev rew) and allow dump (or tar) to overwrite the tape contents.
The best backup facility I have found thus far is a series of scripts at www.backup-central.com - He has written a script called hostdump.sh that works on just about every flavour of Unix out and is well worth a look.

The person responsible is the author of the O'Reilly book "Unix Backup and Recovery" which is most definitely a "must read" book for ANY Unix or Linux admin - it's probably the one book that could/will save your job.

Thanks for the points - cheers - Gavin