Hi there I have a little problem to get my include / exclude working: I want to sync /etc /home and /usr/local (and all files/dirs beneath) to REMOTEHOST:/dest There are some huge files in /home which I want to exclued I have set up an include/exclude file but I still get too much files. Also the excluded file is synced /usr/bin/rsync -av --exclude-from=excl --delete --numeric-ids --relative --delete-excluded / REOMOTEHOST:/dest cat excl + /mnt/md1/backup/akazia.0/ + /mnt/md1/backup/akazia.0/etc/ + /mnt/md1/backup/akazia.0/etc/** + /mnt/md1/backup/akazia.0/home/ + /mnt/md1/backup/akazia.0/home/** + /mnt/md1/backup/akazia.0/usr/local/ + /mnt/md1/backup/akazia.0/usr/local/** - /mnt/md1/backup/akazia.0/home/installsrc/opensuse112.iso - * Any hint what I am do wrong? I have read the man page a thousand times ... Thanks a lot Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20100424/accde9b2/attachment.html>
> I want to sync /etc /home and /usr/local (and all files/dirs beneath) to REMOTEHOST:/dest > There are some huge files in /home which I want to exclued > > I have set up an include/exclude file but I still get too much files. Also the excluded file is synced > > /usr/bin/rsync -av --exclude-from=excl --delete --numeric-ids --relative --delete-excluded / REOMOTEHOST:/dest > > cat excl > + /mnt/md1/backup/akazia.0/ > + /mnt/md1/backup/akazia.0/etc/ > + /mnt/md1/backup/akazia.0/etc/** > + /mnt/md1/backup/akazia.0/home/ > + /mnt/md1/backup/akazia.0/home/** > + /mnt/md1/backup/akazia.0/usr/local/ > + /mnt/md1/backup/akazia.0/usr/local/** > - /mnt/md1/backup/akazia.0/home/installsrc/opensuse112.iso > - * > > Any hint what I am do wrong? I have read the man page a thousand times ...Would you kindly clarify if "/mnt/md1/backup/akazia.0/" is your source or destination. When specifying directories within the rsync excludes file I believe that you list the files relative to the rsync source. Finally, the following lbackup-discussion thread may be of assistance : <http://tinyurl.com/lbackup-discussion-exludes> ---------------------------------- This email is protected by LBackup http://www.lbackup.org
On 4/24/2010 8:30 AM, Michael wrote:> I have a little problem to get my include / exclude working: > > I want to sync /etc /home and /usr/local (and all files/dirs beneath) > to REMOTEHOST:/dest > There are some huge files in /home which I want to exclued > > I have set up an include/exclude file but I still get too much files. > Also the excluded file is synced > > /usr/bin/rsync -av --exclude-from=excl --delete --numeric-ids > --relative --delete-excluded / REOMOTEHOST:/dest > > cat excl > + /mnt/md1/backup/akazia.0/ > + /mnt/md1/backup/akazia.0/etc/ > + /mnt/md1/backup/akazia.0/etc/** > + /mnt/md1/backup/akazia.0/home/ > + /mnt/md1/backup/akazia.0/home/** > + /mnt/md1/backup/akazia.0/usr/local/ > + /mnt/md1/backup/akazia.0/usr/local/** > - /mnt/md1/backup/akazia.0/home/installsrc/opensuse112.iso > - * > > Any hint what I am do wrong? I have read the man page a thousand times ...The include/exclude rules are processed in order until a match is found. In the sample you have provided, the opensuse112.iso exclude rule will never be reached, as it will already have been matched by an include rule for the entire contents of the home directory. If you place this exclude rule first, you will achieve the intended result. -Ben