downloading only specific directories from directory tree

Istvan Gabor suseuser04 at gmail.hu
Thu Jan 11 16:10:33 UTC 2018


Thank you for your answer, Kevin.

2. OK, I understand.

1. I checked colon dirs, and indeed they don't have openSUSE_Leap_42.2
dirs directly. But they have different subdirs which have
openSUSE_Leap_42.2 dirs. What would be the correct filter set
to mirror all openSUSE_Leap_42.2 dirs at any level if I don't want
to include all dirs at the root level? At the roor level tehre are
many dirs and I can't mirror everything at a time because of space
limitations. I would like to mirror different groups from the
root level separately. Either by using root level pattern names or
by directly specifying the dirs I want to mirror. Each root level dir
may or may not have an openSUSE_Leap_42.2 dir directly or at a
deeper level. I want to mirror all openSUSE_Leap_42.2 dirs that
belong to the specified root level dirs. To make it clear, for example,
I want to mirror games, games:, graphics, graphics:, hamradio, 
hamradio:,
hardware, hardware:, only the openSUSE_Leap_42.2 directory containing 
paths.
What would be the rules for this?

Thanks again,

Istvan



On Wed, 10 Jan 2018 18:27:11 -0500, Kevin Korb via rsync wrote:
> 1.  You don't appear to be including anything that is within the 
> colon
> dirs so they are being left out by --prune-empty-dirs.
>
> 2.  Includes only override excludes that follow them.  Since your 
> debug
> excludes are exceptions to the openSUSE_Leap_42.2/*** include they 
> must
> be before it not after it.
>
> On 01/10/2018 05:46 PM, Istvan Gabor via rsync wrote:
>> Dear Kevin:
>>
>> ~ 1 year ago your answer helped me to solve my problem.
>> This time I would like to do a similar thing but little bit 
>> modified.
>> I read again carefully INCLUDE/EXCLUDE PATTERN RULES section of 
>> rsync
>> manual but still cannot comprehend every part of it.
>>
>> I understand I have to add include patterns first and exclude 
>> patterns
>> second. But it is not clear if I have to add all the include 
>> patterns
>> first and all the exclude patterns after them. Or do I have add
>> include/exclude groups?
>>
>> Now I would like to mirror openSUSE_Leap_42.2 dirs from
>> ftp://ftp.halifax.rwth-aachen.de/opensuse/repositories/
>> but only from specified directories and without files with debuginfo
>> or debugsource patterns in their names.
>>
>> I tried this command:
>>
>> rsync -av --include-from=filters.txt --prune-empty-dirs \
>> rsync://ftp.halifax.rwth-aachen.de/opensuse/repositories/ \
>> opensuse/repositories
>>
>> where filters.txt contains:
>>
>> + /filesystems
>> + /filesystems:
>> + /games
>> + /games:
>> + /graphics
>> + /graphics:
>> + /hamradio
>> + /hamradio:
>> + /hardware
>> + /hardware:
>> ...
>> + openSUSE_Leap_42.2/***
>> - *debuginfo*.rpm
>> - *debugsource*.rpm
>> - *
>>
>> but it doesn't work the way I'd like.
>>
>> 1. The directories ending with : in their names are not mirrored.
>> I tried eg /games:  , /games\:  and "/games:", none of these worked.
>>
>> 2. The other directories are mirrored but debuginfo and debugsource
>> files are not excluded.
>>
>> I'd appreciate if you explained what the problem is and how to solve 
>> it.
>>
>> Thanks in advance,
>>
>> Istvan




More information about the rsync mailing list