Posted by Jason Gill on December 12, 2006

Yes, you can rsync between two local directories

Tags:

I wanted to set up a cronjob to backup my photos from a Windows computer to my linux server. To do so I simply set Windows to share the photos directory, then mounted the directory in linux.

The rsync command seemed like the most logical way to sync the mounted directory with my backup directory. However, every piece of documentation I could find online showed examples of rsync communicating with an external server. I’m here to tell you that’s not entirely necessary and setting it up to synchronize 2 local directories works just as well.

rsync -vur --delete --exclude=*.db --exclude=*.info /mnt/photos/ /home/jgill/photos/

Bookmark and Share

4 Responses to “Yes, you can rsync between two local directories”

  1. Thanks for the tip. For some reason I needed to add a fuzzy (y) option to stop it from transferring everything. Can rsync handle files that have been renamed at the source? I now have both files at my destination (original and renamed).

  2. Useful, in searching Google for this your site was the most useful.

    Although I did use a few more switches to preserve permissions and group/user but overall your post was very useful.

    Thank you.

  3. you can still use the client/server systrem using DeltaCopy on the windows machine:
    http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp

  4. Great Job!
    I Use it today and see the results is Cool.
    Thanks.

Leave a Reply