We have a server running linux with mirrored disks, and have an extra hard disk available purely as a backup.
We need a script developed to do the following.
1. Do a daily incremental backup of the entire /home folder.
2. As above but all mysql databases
3. A weekly full backup of #1 and #2
4. A monthly backup of #1 and #2
We then want some cycles of backups kept.
The incremental backups should be kept for 2 weeks before being overwritten.
3 weekly backups should be kept before they get overwritten
2 monthly backups should be kept before they get overwritten.
The script should be invoked with a cron job, and as the hard disk is not physically connected to this machine (it's NAS in another state) your backup script should compress the data before coping.
No authentication, etc is required as the drive is automatically connected at startup.
An email should be send to an email address we will supply each time the backup is invoked with the status success or failure.
On the day the weekly backup is ran (sunday) no incremental backup needs to run and on the day the monthly backup runs (last day of month) no incremental or weekly backup should be run.
You should test this extensively yourself before providing it to us, we cannot give you root access to our servers, so you will need to provide installation instructions.
Note that another system admin will review your script prior to installation for security purposes.
Please ensure you only use standard backup program like rsync, etc that are available on any linux platform.