downloading only specific directories from directory tree

Istvan Gabor suseuser04 at gmail.hu
Fri Jan 20 23:08:31 UTC 2017


Hello:

I have read rsync manual and several howtos on how to use rsync, still
I don't know if it's doable what I want to do, and if yes, how.

The scenario:

I would like to make a local copy of openSUSE 13.2 repositories.
I use openSUSE linux.

The repos are located in a multi-level directory structure, eg:

ftp://ftp.halifax.rwth-aachen.de/opensuse/repositories/

Let's call this directory the root dir.

Each directory in the root has subdirectories, and one of the 
subdirectories
is named "openSUSE_13.2". The openSUSE_13.2 dir can be one, two, or 
more level
downstairs in the root dir, eg:

http://download.opensuse.org/repositories/Apache/openSUSE_13.2/
http://download.opensuse.org/repositories/Apache:/MirrorBrain/openSUSE_13.2/

There are plenty of directories in the root dir, and each subdirectory 
can
have several subdirectories.

Is it possible, using rsync, to download only all "openSUSE_13.2" 
directories with
their contents, without specifying directly one by one every 
subdirectory
to be included or excluded?

I tried to use filters.txt file with content:

+ **openSUSE_13.2/***

with this command:

rsync -av --include-from=filters.txt 
rsync://ftp.halifax.rwth-aachen.de/opensuse/repositories/ ./

This downloads every directory. How can I exclude those are not 
openSUSE_13.2?

Thanks,

Istvan



More information about the rsync mailing list