How to Mirror A Directory Locally Using Rsync

Most of the instructions for mirroring a directory with Rsync involve mirroring the data to a different server. You can also use Rsync to sync or mirror a directory on the same computer as the source directory.

Here is an example command on how to mirror two directories locally. In this example, /home/apache/public_html is the source directory and /home/apache/public_html_bak is the destination directory. Forward slashes at the end of the directory names in the rsync command are important so don’t forget them. The sync is one-way in that the destination will mirror the source:

rsync -avr --delete --links /home/apache/public_html/ /home/apache/public_html_bak/

If you need to preserve ACLs and Extended attributes then you need to add the -A and -X switches:

rsync -avrAX --delete --links /home/apache/public_html/ /home/apache/public_html_bak/

If you want to just do a dry run to see what will happen when you run Rsync, then add the -n switch:

rsync -avrAXn --delete --links /home/apache/public_html/ /home/apache/public_html_bak/

Terminal


Zune – Sync using different software

zAlternator Screenshot

zAlternator allows you to sync your Zune with software other than the Zune software like Windows Media Player, iTunes, Winamp, or Media Monkey. You can read more about zAlternator at this link.

And here is a description of the application from it’s homepage:

“Finally, a release candidate of zAlternator is here! Yay! zAlternator is a program that will allow the Zune to be picked up and synced with programs other than the Zune program. It has been fully tested and proven to allow the Zune to be picked up and synced with the Zune program (duh), Windows Media Player 11, Winamp, and MediaMonkey. I have been unable to fully test the iTunes side of the program, but hopefully it should work.”