rsync filters
Hal Burgiss
hal at burgiss.net
Thu Sep 24 17:34:14 UTC 2009
On Thu, Sep 24, 2009 at 10:15:31AM -0700, Smoot Carl-Mitchell wrote:
> On Thu, 2009-09-24 at 12:33 -0400, Hal Burgiss wrote:
>
>
> > For instance, I get this kind of output ...
> >
> > bin/
> > deleting bin/znew
> > deleting bin/zmore
> > deleting bin/zless
> > deleting bin/zgrep
>
> > The command line I am using is:
> > rsync -vazSHF --no-blocking-io --partial --delete-during --delete-excluded --timeout 600 --dry-run / $sync_dst:/
> >
>
> Your problem is the --delete-excluded flag. It will delete files on the
> target which are excluded on the source. That is why you are getting
> the delete messages. You probably want the --delete flag which will
> delete files on the target which are not on the source and not in the
> excluded category.
Command line is now:
-vazSHF --no-blocking-io --partial --delete-during --delete --timeout 600 --dry-run
with what looks to be identical results as previously. We still want to delete
everything in /bin.
What really does not make sense to me, is that I have excluded all toplevel
directories. Yet there is different behavior from some as compared to others.
Eg, /bin wants to be deleted, /sys does not. Yet, they are specified in
*identical* syntax.
- /usr/*
- /bin/*
- /boot/*
- /dev/*
- /initrd
- /lib/*
- /media/*
- /mnt/
- /opt/*
- /proc/*
- /sbin/*
- /srv/*
- /sys/*
- /tmp/*
- initrd.img
- /vmlinuz/*
- /cdrom/*
- /raid/*
- /proc/*
- /var/*
- /etc/*
Thanks for the ideas, keep 'em coming. There is something I am missing and its
probably too obvious for me to see it.
--
Hal
More information about the ubuntu-users
mailing list