PDA

View Full Version : cron running backup



mattsoftnet
March 2nd, 2006, 16:11
there's no tech forum or anything, so hope this is where I should put this post.

how do I run a backup with a cron tab? do I call the cpbackup script with arguments or something?

ced
March 2nd, 2006, 23:45
your forum ????
vbulletin, ivb, phpbb ?

Webdude
March 3rd, 2006, 00:49
There are many ways. If you want simplest, basically this does a mirror copy.

cp -Rfpud /path/to/be/backed/up /path/to/backup/dir

Set cron to run it whenever you want. I like this method because it's also easiest to restore deleted files from. For example....

/mnt/backup is a 250 gig second drive...
/home is what you want to back up from the first drive.

cp -Rfpud /home /mnt/backup/

If you have a LOT in /home, have it run like 2AM because it will take a while. I will occassionally do these manually once in a while just to create "easy to restore from" backups. This is also the cheapest way without need of any more hardware or software other than the software you already have, and possibly a new second drive if you dont already have one.