i need a script that will gzip up a list of directories (including subdirectories) and mysql databases and ftp them to another server (leaving the 2 most recent backups [configurable] on the ftp server, deleting anything older). in the event of any problems it will send an email message with errors encountered. gzips should be split by each item in the list and timestamped in the filename [configurable].
.../test1/ (gzips into [url removed, login to view])
.../test2/ (gzips into [url removed, login to view])
.../test3/ (gzips into [url removed, login to view])
script must be very robust, and will be run once a day on a cron job.
It must also include a restore option, where a specified backup is restored to its original location.
You must have had experience doing this type of script before