Home or office Backup Server Solution
By Red Squirrel
If you have many jobs and many drives you'll probably want to set up some kind of script to easily call with different parameters and such, and this will make setting up scheduled backups much easier.
This is the main script I use, and pass the parameters to. Depending on your needs this script may do, or you may want to write your own. This script is static, meaning it should rarely need to be modified even if you add new jobs or modify some.
This script should be on a partition that is on the main drive (OS drive). This drive is never removed unlike the backup data drive(s). In addition to this main script, you then have separate scripts for different backup jobs which I'll refer to as job scripts. An example of such script would be
The parameters are passed on, and end up in the $1 variables.
This script should also reside in the main drive, and you can even split up the jobs in several scripts if you want. The main thing is, the passwords will all be in the same place, so it's only one area to worry about securing, vs if you put this script on the backup drive itself.
There's one last script to make, this script should exist on each backup drive with the same name. This is the script you call with your cron job. This script would simply call the proper backup script shown above. So if you put in the drive for Server A, then the script should call all the scripts that backup data from server A. So the backup jobs depend on which drive is in. If you simply scheduled each job, then you'd have to worry about inserting the right drive every day. This way, it matters less, you simply need to rotate the drives around in no particular order and it will still backup the right data to the right drives. It's not a bad idea to echo out the job name in this script, as well, so when you check the logs, it's the first thing you'll see and you know which drive was in at that time.
So basically you have
This site best viewed in a W3C standard browser at 800*600 or higher
Site design by Red Squirrel | Contact
© Copyright 2019 Ryan Auclair/IceTeks, All rights reserved