rsync exclusions

No more questions - please go to http://www.syncovery.com/forum instead

Moderator: SuperFlexible Administrators

rsync exclusions

Postby lucky81 on Wed May 27, 2015 7:54 am

Hello,


I am testing Syncovery+rsync (both cwRsync v4.1.0 and v5.4.1) and it does not seem to respect exclusions. Typically, you need to create exclusions for "/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"

Otherwise you get an error Error accessing folder rsync://XXX.XXX.XX.XX/: An unexpected network error occurred. Cannot get rsync listing, error 24, which basically means some files vanished before they could be transferred and the sync fails.

I can see that the exclusion is correct in Syncovery:
Code: Select all
[Exclusion Masks]
ExcludeFileMasks=/dev/;/proc/;/sys/;/run/;/lost+found


But based on the log, the rsync command created by Syncovery does not include any of this. If I run this command manually:
Code: Select all
"C:\Program Files\Syncovery\cwRsync\bin\rsync.exe" -t --exclude-from=exclude.txt --no-perms --no-owner --no-group -H --chmod=u+w,a+rX -v --stats --progress --rsh="'C:\Program Files\Syncovery\cwRsync\bin\ssh.exe' -o PasswordAuthentication=no -o KbdInteractiveAuthentication=no -o UserKnownHostsFile='/cygdrive/C/Users/USER/.ssh/known_hosts' -i '/cygdrive/C/Users/USER/.ssh/id_rsa' -p 22" -s -r "root@XXX.XXX.XX.XXX:/" /RightFolder


Where exclude.txt contains:
Code: Select all
/dev/
/proc/
/sys/
/run/
/lost+found/


It works beautifully.
lucky81
 
Posts: 4
Joined: Tue May 19, 2015 6:51 pm

Re: rsync exclusions

Postby superflexible on Thu May 28, 2015 3:15 pm

That's correct, exclusions are processed internally and not passed to rsync.
User avatar
superflexible
Site Admin
 
Posts: 2478
Joined: Thu Dec 31, 2009 3:08 pm

Re: rsync exclusions

Postby lucky1981 on Thu May 28, 2015 9:51 pm

Unfortunately that makes rsync almost unusable. I guess the only option is to create separate Syncovery profile for each folder and skip the ones you don't want- e.g.:
Code: Select all
rsync://XXX.XXX.XX.XX/bin
rsync://XXX.XXX.XX.XX/boot
rsync://XXX.XXX.XX.XX/boot.bak
rsync://XXX.XXX.XX.XX/etc
rsync://XXX.XXX.XX.XX/home
rsync://XXX.XXX.XX.XX/lib
rsync://XXX.XXX.XX.XX/media
rsync://XXX.XXX.XX.XX/mnt
rsync://XXX.XXX.XX.XX/opt
rsync://XXX.XXX.XX.XX/root
rsync://XXX.XXX.XX.XX/sbin
rsync://XXX.XXX.XX.XX/srv
rsync://XXX.XXX.XX.XX/tmp
rsync://XXX.XXX.XX.XX/usr
rsync://XXX.XXX.XX.XX/var


Would that help, or is it always snatching everything (/) and then deciding what to keep?
lucky1981
 
Posts: 1
Joined: Tue May 19, 2015 6:40 pm

Re: rsync exclusions

Postby superflexible on Fri May 29, 2015 2:14 am

Yes that would work.
User avatar
superflexible
Site Admin
 
Posts: 2478
Joined: Thu Dec 31, 2009 3:08 pm


Return to Windows Support * new forum: www.syncovery.com/forum

cron