We need a script that will do the following:
1. Complete backup; the script will transfer all the files and folders in a specified folder to a folder on another server via the FTP protocol (this server will be password protected). Upon arrival it should check whether all documents were sent without issue. This system should be very secure. It should maintain complete file structure in the new location.
2. Update backup: the script will check all files that have not yet been backed-up and send those to the other FTP location. It should then again check whether all files on the original server are also on the new server. As above it should be secure and maintain file structure.
Both functions above should be executable manually and set as a cronjob. We should be able to easily change the server, server credentials and folder it uploads to.
Also, the script should be able to run parallel, i.e. where we have two parallel cronjobs running to back it up to two different servers.
- we will have full access to original server and backup server(s), so we can run scripts on all servers
- the code should be clean and not rely on unproven technologies, preferably stick to the built in functionalities of PHP