This will backup your entire remote server to your local Macintosh computer. It uses the command line so it’s not for beginners.
Open a terminal window and type the following:
rsync --recursive --verbose --archive --progress --stats --size-only --dry-run firstname.lastname@example.org:folder_to_backup ~/Sites/
replace email@example.com:folder with the folder you want to back up from.
For me it was firstname.lastname@example.org:public_html
This will do a practice run!! If it looks OK, repeat the command with –dry-run removed!
Here’s how to make it so you don’t need to type in your password each time you rsync to the remote machine:
- Open the terminal window and type
ssh-keygen -t rsa
Follow the prompts and use the defaults for the filenames it gives you. Don’t enter in a password.
- Go to the finder menu Go|Go to Folder and type in ~/.ssh
You should then have two new files id_rsa and id_rsa.pub.
- Use your ftp program to copy id_rsa.pub into the .ssh directory in the home folder on your server machine, and rename it to authorized_keys.
Now you won’t be prompted for a password when you rsync to the server!