Best rsync commands

By | November 7, 2013

Feel free to see the man pages if you are curious what the various switches do, however I like to remember this by the phrase “Fo Havix” which actually looks like this:

rsync -PHOhavix /source/directory/from/source/server [email protected]:

Where xxx.xxx.xxx.xxx is is the remote IP address and /source/directory/from/source/server is obviously the source servers directory you want to copy to the remote server.  If you want to copy it to a specific directory then you can do:

rsync -PHOhavix /source/directory/from/source/server [email protected]:/destination/directory

Where destination/directory is the destination directory.  Rsync is much better than SCP because you can copy more than just files and even have it run as a job to continually copy throughout the day.