Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 08-03-2008, 12:51 PM   #1
uluru
Prospect
 
Join Date: Aug 2008
Posts: 4
rsync resends all the data - with windows share

Hallo,
I just joined macosxhints after years of lurking and helpful hints.

I have a problem with rsync on a windows XP share I have. Every time I perform an rsync on that drive all the data are sent again.

I mount the share with the following command in finder (option k)
Code:
cifs://<workgrooup>;<username>@<win_pc ip addr>/<share name>
Everything works smoothly on finder, I can read, write, delete, rename, etc.
note: the pc is on a LAN and the <username> I use from my mac (I run Tiger, 10.4) is not the pc username (I'm used to create different users for different tasks, as is with *NIX systems), hence it has full rights on the share but no admin capabilities as my XP username. I don't think that affect the issue, but better to specify it. The share is on a NTFS partition.

One day I was confident enough to use rsync at home (I was too scared to lose data) and I started using it, but I quickly found out that it didn't work as intended.
The first transfer went well, but after that all the files are always sent to the win PC.
I searched in Internet and I found here one possible reason:
Quote:
Another lesson is that the FAT32 partition should be mounted with the "shortname=mixed" option. If not, the rsync gets messed up. The default option is "lower," which means that files and directories with short names will have their names forced to lower case. But then rsync will think they're different from the ones it sees in the source that are upper case, and it will send the upper case ones again, and then delete the lower case ones. But since it's really the same files, the end result is it transfers a bunch of data and then deletes it all! Not good.

I then tried to use it on my mac, manually mounting the volume with mount, mount_smbfs and also with osascript (using this old but valid hint and comments):
Code:
mount_smbfs "cifs://<workgrooup>;<username>@<win_pc ip addr>/<share name>" /Volumes/<share name>/
osascript -e "try" -e "mount volume \"//<username>@<win_pc ip addr>/<share name>\" -e "end try"
But shortname is not a supported option on mount on mac. I looked here,only linux results.

Is there anything I can do to force the mount to consider the filename's case?
I would try to avoid to use fink or similar *NIX software port to mac, as I installed it once and I got 4 GB of files on my tiny laptop HDD that is almost full. If there's a way to download mount binaries for mac and few other libraries is fine, but otherwise my 1.5 GB of free space don't suggest to pursue that way.

I checked on my windows XP computer and I can't find the place where to check for my font display options (I guess it's a 98 feature).

Any help is much appreciated.

[Before posting I found the following two discussions on this forum discussion1 and discussion2, bot no one was relevant to my question]
uluru is offline   Reply With Quote
Old 09-30-2008, 04:31 AM   #2
uluru
Prospect
 
Join Date: Aug 2008
Posts: 4
Nobody can help?
uluru is offline   Reply With Quote
Old 09-30-2008, 04:45 PM   #3
ataraxia
Major Leaguer
 
Join Date: Aug 2004
Location: Pittsburgh
Posts: 349
You might try "--modify-window=1" in your rsync command line. The rsync manpage says this about it:
Quote:
--modify-window
When comparing two timestamps, rsync treats the timestamps as
being equal if they differ by no more than the modify-window
value. This is normally 0 (for an exact match), but you may
find it useful to set this to a larger value in some situations.
In particular, when transferring to or from an MS Windows FAT
filesystem (which represents times with a 2-second resolution),
--modify-window=1 is useful (allowing times to differ by up to 1
second).

ataraxia is offline   Reply With Quote
Reply

Tags
cifs, mount, rsync, samba, windows file sharing

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 02:03 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.