Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Server to server storage migration

I have a hosting account at Dreamhost, but I want to move to either a Google Cloud Storage, or Amazon AWS cheaper storage.

It's a lot of files (over 70GB), I could use CyberDuck to FTP everything to my pc and then back up to the new hosting, but I believe the pro's (Treehouse) wouldn't do it that way at all. Can anyone provide me with a simple article on how to connect two servers to each other like this? In the last episodes of the command line tutorial Jim taught cp and mv, so I'm familiar with those.

Dreamhost requires I set up an SSH tunnel to connect via command-line (this means I have to somehow get my head around 'Pageant'.

Any tips are most appreciated!

5 Answers

James Barnett
James Barnett
39,199 Points

TL;DR SSH into Dreamhost and use something like this:

rsync -avz <path>/* <new server>:/<path>


How copy over a website

  1. Setup New Hosting Account
  2. Copy your files from Dreamhost to your new hosting account
  3. Backup any Databases you have (such as MySQL)
  4. Setup Databases on new server and import backups
  5. Make sure everything is working on the new server
  • Pay careful attention to absolute paths
  • Firewall rules you may have had setup at dreamhost
  • Form submissions
  • Databases setup
  • CMS systems like Joomla & Wordpress

How to cut over with minimal downtime


rsync fundamentals

Thanks very much James for the full description! Luckily this is just a storage of images, word docs, PDF's etc. (71GB) No a CMS or any website needs move. If this succeeds then I might be brave enough to try moving my website! Will let you know how it works out :)

James Barnett
James Barnett
39,199 Points

@Jen - If you are just moving some files, that's way less complex

This should be all you need:

rsync -avz <path>/* <new server>:/<path>

Great stuff, James. What does the "-avz" mean?

James Barnett
James Barnett
39,199 Points

Jen - In linux you can use switches to change how a command works.

ls -l will show a detailed listing of files in a directory, the l stands for long. You can also combine switches as I did here.


In the case of rsync -avz, I couldn't remember, I just always used those switches, so I had to look it up on http://ss64.com/bash/rsync.html

  • a = archive
  • v = verbose
  • z = compress

"archive" mode ensures that symbolic links, devices, attributes, permissions, ownerships etc are preserved in the transfer.


If you are ever curious what a switch for a Linux command does, your first stop should be ss64.com/bash.