Excluding two subdirectories in rsync

Anne Wilson annew at kde.org
Tue Aug 25 13:31:47 UTC 2009


On Tuesday 25 August 2009 14:18:48 Robert Moskowitz wrote:
> I have been using an rsync for Centos updates like:
>
> rsync -auv rsync://mirrors..../updates/i386/ --delete --exclude=debug/
> /repos/centos/updates/i386
>
>
> But for Fedora 11, I see there is a drpms subdirectory that I ASSuME I
> don't need, drpms.
>
> How do I exclude two subdirectories?  I can't figure it out from the man
> pages.
>
> --exclude="debug/ drpms/"   ???

You need a skip-list file.  Mine is called rsync_skiplist, and contains the 
following:

*~
.[a-z]*
.[A-Z]*
lost+found/
recordings/
Temp/mydvd

Directories are relational to the directory where  your rsync script is, so in 
this case I'm skipping ~home/anne/recordings, for instance.

Then, in your rsync script, simply insert into your command --exclude-
from=/home/you/rsync_skiplist - adjusting path, of course.

HTH

Anne
-- 
New to KDE4? - get help from http://userbase.kde.org
Just found a cool new feature?  Add it to UserBase
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20090825/9c30c7d9/attachment-0001.sig>


More information about the fedora-list mailing list