[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsync weirdness



Willie Wonka wrote:
JJ wrote:
Roberto Sanchez wrote:
I don't think I have lost the rsync data.  Basically, what I do is:

rsync -nave ssh ~/Documents/stuff/ remote:~/school/stuff/

Even if have changed only one or two files, it still wants to transfer
everything.

I will check out rdiff-backup.

-Roberto

Your command is correct for what you want.  I
think you are running into issues with differences between the
filesystems meta data. The -a options tells it to sync. up uid, gid,
permissions, etc. So  it is probably changing the uid and gid for all
your files as it goes along. Causes a slight delay, but rsync is smart
enough to not copy the complete file if the content hasn't changed.

I have a Mac which I rsync files back and forth with a debian server.  I
ended up adding the extra users and groups I needed to my mac (using
NetInfo Manager)--making sure to use the uid's and gid's from the debian
server. Many *nix systems start uid's at 500, but Debian starts them at
1000. I even changed the uid of my mac account to match the uid on my
debian account. If you do this make sure you then update all your files
on your Mac with your new uid.


Any help to you guys?
<http://www.quesera.com/reynhout/misc/rsync+hfsmode/>
and <http://hfsrsync.darwinports.com/>


I figured it out.  Basically, I needed to use this command:

rsync --exclude '.DS_Store' -ncrve ssh ~/Documents/stuff/ remote:~/school/stuff/

The -c option tells it to compare based on sums (probably md5) instead of the rsync algorithm. I am still stumped as to why this works, especially since changing the -a to -r in the original command line yielded the same results. The weird thing is that transferring the whole directory over to my Debian machine and then using rsync between the two local directories makes it want to update every single file and directory. In this case, using -c again results in the desired behavior.

-Roberto

--
Roberto C. Sanchez
http://familiasanchez.net/~roberto



Reply to: