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
On Thu, May 20, 2004 at 10:12:38AM +0000, Philip Roche wrote:> 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.Sounds like you're not running the rsync command as root. There was a bug in older rsyncs with --link-dest in such a case. That would also explain why ownership is not being preserved. I'd suggest upgrading to 2.6.2. ..wayne..
Hi Phillip, I have same problems with rsync and I use a post script that replace groups and ownerships after the sync. Look for setacl projet on www.sf.net Hope that's help David LIMA Ing?nieur R?seaux SCC Services -----Message d'origine----- De?: Wayne Davison [mailto:wayned@samba.org] Envoy??: mardi 25 mai 2004 17:42 ??: Philip Roche Cc?: rsync@lists.samba.org Objet?: Re: Rsync snapshot on Linux from Windows server On Tue, May 25, 2004 at 11:36:35AM +0000, Philip Roche wrote:> Well I've upgraded to 2.6.2 on the Linux side (and 2.6.0 on the NT > side, the most up to date cygwin version of rsync), and (as before) I > have been running the script as root (and adminstrator on the Windows > side)The important part of duplicating the owner and group info is what permissions the receiving rsync is running as, and I believe you said that the Linux box is the one receiving the data, so it needs to be running as root. It works best if you're running the receiver on the same machine that has the destination disk mounted (writing to a remote samba share may even restrict root's permissions). ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Sorry but I have not well read your post ... You should look at the backuppc project, it can use rsync and has a wonderfull cgi web interface that users can have access to (restricted by user/password) . they can restore their files with simple clic on the web interface. Hope that's help David LIMA Ing?nieur R?seaux SCC Services -----Message d'origine----- De?: LIMA David Envoy??: mercredi 26 mai 2004 13:21 ??: Philip Roche Cc?: rsync@lists.samba.org Objet?: RE : Rsync snapshot on Linux from Windows server Hi Phillip, I have same problems with rsync and I use a post script that replace groups and ownerships after the sync. Look for setacl projet on www.sf.net Hope that's help David LIMA Ing?nieur R?seaux SCC Services -----Message d'origine----- De?: Wayne Davison [mailto:wayned@samba.org] Envoy??: mardi 25 mai 2004 17:42 ??: Philip Roche Cc?: rsync@lists.samba.org Objet?: Re: Rsync snapshot on Linux from Windows server On Tue, May 25, 2004 at 11:36:35AM +0000, Philip Roche wrote:> Well I've upgraded to 2.6.2 on the Linux side (and 2.6.0 on the NT > side, the most up to date cygwin version of rsync), and (as before) I > have been running the script as root (and adminstrator on the Windows > side)The important part of duplicating the owner and group info is what permissions the receiving rsync is running as, and I believe you said that the Linux box is the one receiving the data, so it needs to be running as root. It works best if you're running the receiver on the same machine that has the destination disk mounted (writing to a remote samba share may even restrict root's permissions). ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html