I am using rsync to try and keep the development environment on 4 machines consistant. I am using Rsync version 2.6.4 under Debian Sarge I am trying to sync between real servers and vmware ones so the time stamps could be an issue but I have set the vmware machines to update time via ntp on a regular basis and made the --modify-window=2010 so I thought I should be fine. The problems I have encountered are: 1) If I do a full sync with deletions rsync wants to delete a huge number of entries in the dev directory that by rights it should not touch. The date and time stamp are identical between the 2 systems the file sizes are identical. The permissions are the same but it still leave some dev entries intact and then deletes the rest. 2) The same problem as number 1 in that files that are on both the source and destination exist but rsync deletes a whole pile of files particularly alot of stuff from /etc/logwatch or /etc/webmin. There are many other instances of this. 3) If I am trying to keep the /etc/directories in sync, rsync does weird things with the passwd, group and assosiated shadow files (eg copies the passwd firle but won't copy the shadow file). In order to make it work I have to exclude these files but i really want these synced as part of what is happening is users are being set up and I don't want to have to manually create these on each machine 3) I have excluded things like /proc /sys and various encryption keys from various locations but I seem to have to exclude alot more to make it even half way workable. Is there some issue with tryign to keep 2 running machines in sync this way? An example of the rsync command I am executing is: rsync --verbose --progress --stats --compress --archive --sparse --devices --delete-after --update --delay-updates --partial --ipv4 --modify-window=2010 --exclude-from=/root/scripts/rsync/exclusions --include-from=/root/scripts/rsync/inclusions --delete --backup --backup-dir=/mnt/data/backup/rsync --partial-dir=.rsync-partial --temp-dir=/mnt/data/rsync/tmp --bwlimit=35 --dry-run --one-file-system 192.168.159.4::root / I would like to know if I am doing something wrong here or it if -- -- Best Regards - David
On Sun, Oct 16, 2005 at 10:45:24PM +1000, David wrote:> could be an issue but I have set the vmware machines to update time > via ntp on a regular basis and made the --modify-window=2010 so I > thought I should be fine.I don't see why you want timestamps to be able to differ by 33.5 minutes. Also, the time the two machines keep doesn't matter from the perspective of rsync-copied files -- as long as you're using the --times option (which you don't seem to have specified) and each file's time gets saved correctly to the file system, all should be well.> 1) If I do a full sync with deletions rsync wants to delete a huge > number of entries in the dev directoryWhich probably means that you don't have your directories lined up the way you thought. Use --dry-run (-n) and lots of -v options to see what rsync is doing. ..wayne..