Symlink file syncing issue
rsync at joelmwatson.com
Sun Nov 7 21:51:40 GMT 2004
I've been attempting to use rsync to sync a set of files between my
laptop and my desktop. I've tried using google to search the archives,
but didn't find anything that addressed this issue exactly... First of
all, here are the details of how I have things set up.
Server acting as the intermediary:
OS: Mac OS X Server 10.3
OS: Mac OS X 10.3.6
OS: Mac OS X 10.3.6
On both machines I have a folder located at ~/Sync. This folder
contains symlinks to the files I want sync'd:
lrwxr-xr-x 1 username staff 54 7 Nov 00:24 AddressBook ->
lrwxr-xr-x 1 username staff 52 7 Nov 00:25 Adium 2.0 ->
/Users/username/Library/Application Support/Adium 2.0
lrwxr-xr-x 1 username staff 45 7 Nov 00:25 Bookmarks.plist ->
lrwxr-xr-x 1 username staff 32 7 Nov 00:25 Calendars ->
lrwxr-xr-x 1 username staff 39 7 Nov 00:04 StickiesDatabase ->
-rw-r--r-- 1 username staff 14142 7 Nov 00:05 Sync_From_Log.txt
-rw-r--r-- 1 username staff 1945 7 Nov 00:26 Sync_To_Log.txt
AddressBook, Adium 2.0, and Calendars are all directories.
Bookmarks.plist and StickiesDatabase are files.
The command I'm using to sync to the server:
rsync -avzL -e ssh --exclude ".DS_Store" /Users/username/Sync
username at the.server.address:~/
This works perfectly and does exactly what I want.
The command I'm using to sync from the server:
rsync -avzL -e ssh --exclude ".DS_Store"
username at the.server.address:~/Sync /Users/username/
This works as expected for the folders (the symlinks remain intact at
~/Sync on the local machine and the linked locations are updated), but
the symlinks to files are simply replaced with the copies from the
server rather than the linked locations being replaced. For the life of
me, I can't figure out why individual file symlinks are treated
differently from folder symlinks. What I'm suspecting right now is that
it has something to do with the -L option, but I couldn't seem to find
anything detailing this specific situation online or in the man file.
Any help would be greatly appreciated. I've spent many a long hour
trying to work this out to no avail. Thanks!
"Smiting his breast, he reproached his heart with word.
Endure, heart; you have endured worse before." - Odyssey, XX 17-18
More information about the rsync