I use rackspace cloud sites and don't have accsess to SSH or RSYNC on their servers, but I do access to SSHFS.
I would like to be able to backup my cloud site to my local Ubuntu server, which has SSH, RSYNC etc.
So far, I'm thinking the best way to do this, is to mount the site on the local server using:
sshfs [email protected]:/path-to-site/ ~/Sites_Mounted/site-name/ -o reconnect,cache=no,compression=yes,ServerAliveInterval=15
Reconnect - so the connection will reconnect if it drops
Cache=no - because we want live backups not old cached files
Compression - to minimise bandwidth usage
ServerAliceInterval - as SSHFS drops out after a long time and crashes
I was then thinking about using a RSYNC command to copy the mounded sites files to a backup directory on the local server, then when the next backup is due 12hrs later, copy/RSYNC the backup dir to a new backup dir (with different name i.e. 2012-01-01-sitename) then using a RSYNC comand to copy only the changes on the remote server to the new backup dir that contains the old/previous backup.
My questions are, will this approch work? If so, what commands would i need to use and would it be posible to include all those in a single .sh script that I could run?
Or is there a simpler, more efficient or better way to do this.
(I think I can zip the entire site on the server and download that but this seem a bit resource heavy)