rsync two (remote) folders

When you want to keep two folders synchronised simple but effective, use rsync!

1. Make sure you’ve installed rsync, if not install it using your preferred package manager.
2. Use the following command to synchronise ‘/home/wouter/folder1′ with ‘/home/wouter/folder2’:

rsync --recursive --copy-links --times --verbose /home/wouter/folder1/ /home/wouter/folder2

When you want to use rsync over the Internet (over SSL) use:

rsync  --recursive --copy-links --times --verbose /home/wouter/folder1/ wouter@host.domain.tld:/home/wouter/folder2/

Make sure you have access to the remote server over SSH. When your rsync client starts complaining that it cannot find or initiate rsync, use following extra option:


Leave a Reply

Your email address will not be published. Required fields are marked *