Well here is what I would do:
1.) Make a file that has all of the commands you want to perform at the same time
- ex: make a script called nightly_backup (give it executable permissions)
2.) Make your crontab file (ex: cron_file)
- This file is used by the crond process to tell it what times you want to run your scripts
- This file could look like this
##################################
## Nightly backup cron file
30 02 * * * /home/user/nightly_backup
###################################
then do (as root) # crontab cron_file
This will execute the script /home/user/nightly_backup every night at 2:30 AM
Then all you need to do is make your script nightly_backup and have it perform the functions that you want it to.
I would reccomend that you have ssh setup for every server. Also you will want to have your ssh set up so that you do not need passwords for the users (to make scripting much easier). If you dont know how to do that, we can work with that. Then you would setup your tar statements after you ssh to the server, use scp to copy the files back to your backup server and that should be it (maybe make a log of the process).
|