Quote (gamemaste789 @ Nov 2 2014 04:20am)
i have a bash file, set up to zip up certain folders every 12 hours, and moves it to /var/www/html/backups. Im setting up a backup server to run a script with php to download the zip from another server
Use RSYNC then. It was meant for backing up files/directories. It works over SSH so all your files are encrypted while being transferred over the wire, and RSYNC only transfers files which have changes made to them (you need another flag to delete files which no longer exist in the backup automatically). This means once you do your first initial backup, any other backup will only send the pieces of the file which has been changed. For example if you changed 2 words in the source code, it will detect that and onyl send the two words to patch the file on the other server instead of sending the whole file.
Code
rsync -rchvzP --stats username@hostname.com:/var/www/backups /my/local/folder/to/move/to/on/this/box
Run it on the server you want to download your files to.
Alternatively you can push files onto the other server instead of pulling. I would read the man page as there are a ton of options, some more specific than others such as also transferring over file permissions (uid, gid) and symlinks/hardlinks and the like.
Trying to use php to transfer your backups is retarded.
If you want a good backup scheme use RSYNC in a bash script and setup a cronjob to execute it every 12 hours on the box you wish to download the backups to. Or if you want to isolate everything to one box run it on the box with the backups located and use a "push" method to send the files to the other server.
This post was edited by AbDuCt on Nov 2 2014 01:04pm