Rsync snapshot on Linux from Windows server

Philip Roche philip.roche at rochesystems.ie
Thu May 20 10:12:38 GMT 2004


I've been trying to set up a script (inspired by Mike Rubel's scripts) to 
perform rotating snapshots of the users folders on a Windows server. The 
machine storing the snapshots is Linux. I have the Windows machine configured 
as an rsync server, with rsync 2.5.6 and cygwin 1.5.7-1, and the Linux machine 
has rsync 2.6.0

The objective is to have regular snapshot backups that users can access 
directly, via Samba, but that do not take up too much space on the Linux 
system.

I tried running a script with the following rsync line:

 rsync -avv --delete --modify-window=1 --link-dest=/backup/01 
$SHOST::"$SPATH" /backup/00/

Everything gets copied with this, but new copies of every file are created on 
each subsequent snapshot, even though the files have not changed. Also, no 
permissions or ownership information seem to be transferred.

If I modify the rsync parameters from "-avv" to "-rpltvv", the copy operation 
works, and unchanged files are recreated as hard links in the subsequent 
snapshots, but again, there is no original ownership and permission 
information retained. 

Finally, just to be sure I tried the parameters set to "-rpltogvv", which just 
made it copy each file on each subsequent snapshot, not creating hard links.

One of the main points with this is that if I make the users backed up data 
available via samba, it's important that only the users themselves can access 
their own data, as per the permissions set on the Windows server. I understand 
that Linux/Unix and Windows permissions are not really compatible or easy to 
cross map, but does anyone know of any way to do this for example creating 
equivalent groups and users on the Linux machine, and somehow getting owner 
and permissions data transfered with the files to match up with these?

I was also wondering why rsync appears to think the files are completely 
different each time if preserve owner and group is specified, and does not if 
they are omitted. It wouldn't be a lot of progress if you could map the owner, 
group, and permissions, but rsync transfered and created a new copy each time.

Does anyone understand what's happening here, and is there any hope with the 
windows ownership and permissions question?

Philip Roche



More information about the rsync mailing list