CRego3D
11-22-2000, 04:04 PM
HI everybody
Anybody know of any good cron jobs to backup the system files (/var /usr/ /etc) as well as each customer (in /home) individually to another HD ?
Thanks for any help
jtan15
11-23-2000, 08:24 PM
Well, you could just as easily program a shell script to do it and have a cron job execute that shell script every so often. E.g.
#!/bin/sh
mount /dev/hdb /backup
cp /var /backup/var -R
cp /usr /backup/usr -R
cp /etc /backup/etc -R
umount /dev/hdb
That should do the trick. Basically it just mounts the drive, and copies all of the directories onto the other hardrive. You might have to add an option or two to the cp command to overwrite old files. The -R option should copy the directories though.
Travis
11-24-2000, 12:01 AM
Just a suggestion - you may want to replace that -R option with a -ax. That combines a number of options, including -R, and some important others. Most notably, it will preserve the ownership and permissions of files.