Mar 13

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 yourusername@yourservername.com:folder_to_backup ~/Sites/

replace yourusername@yourservername.com:folder with the folder you want to back up from.

For me it was username@mac-host.com: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:

  1. 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.
  2. 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.
  3. 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!

Enjoyed this article?

You can help me by clicking on any other article. Google have started penalising this site because it is so good! People read an article, get the answer they want, and leave. I think this is a great thing, but Google have a different view. They call it a 'bounce' and have started penalising sites that people only visit one page on. They perceive it as 'you didn't like what you saw, so you left' when in fact it could have been 'you got what you needed so you left.' So please, if this article was helpful, just click back to the front page or to any other article on this site. This says to Google you like this site. Thanks!

Leave a Reply

Copyright © 2013 Wayne Connor. All rights reserved. | Hosted on bluehost.com Click here to find out why.
preload preload preload
css.php