Create a script which will automatically (via cron job) run on a schedule that will compress all the databases into one file, and all of the files in a given folder into another file, then save these on the server in a specific folder and FTP them to an FTP account and send an email notification of the files created and uploaded.
## Deliverables
Create a script which will automatically (via cron job) run on a schedule that will compress all the databases into one file, and all of the files in a given folder into another file, then save these on the server in a specific folder and FTP them to an FTP account and send an email notification of the files created and uploaded.
Must have a config file to set:
- database login credentials
- root file folder to compress (i.e. public_html/store) so the entire "store" folder would be compressed
- folder exculsions (allow for multiple folders to be listed using comma seperated) i.e "images,tmp" so the folders /public_html/store/images and /public_html/store/tmp would be excluded from the file/folder compression
- email address to send the report to (allow for multiple email addresses comma separated)
- FTP details on where to upload the files (server, username, password, folder)
- frequency (daily, weekly (pick day), monthly (pick day))
All compressed files should be in the format:
Database: [login to view URL]
Files: [login to view URL]
One database file should be created per database which is accessible via the credentials. If more than one, then one file per database.
The files for this backup routine should be contained in a single folder. Once you provide this, I should only have to upload to the server, change the config file, and then create the cron job.