LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Rsync exclude (or include) issue (http://www.linuxquestions.org/questions/linux-general-1/rsync-exclude-or-include-issue-788116/)

eyeprotocol 02-09-2010 09:16 PM

Rsync exclude (or include) issue
 
Hello.

I am trying to use rsync in order to create a mirror of the contents of a remote disk. I know how to do it, but here is the problem: the disk contains several directories, each of which has the exact same contents, except for a subdirectory.

For example

Directory One
file 1
file 2
file 3
subdir 1
subdir 2
file 4
...
Directory Two
file 5
file 6
file 7
subdir 3
subdir 2
file 8
...
I am interested in mirroring the contents of "subdir 2", and not the contents of any other file or dir that may (or may not) be inside "Directory One" and "Directory Two".

I've already tried several ideas for including (or excluding) names in my rsync command, but nothing i can think of seems to be working properly. I would appreciate any help.

Panos

eckirchn 02-10-2010 12:08 AM

Quote:

Originally Posted by eyeprotocol (Post 3858469)
Hello.

I am trying to use rsync in order to create a mirror of the contents of a remote disk. I know how to do it, but here is the problem: the disk contains several directories, each of which has the exact same contents, except for a subdirectory.


I've already tried several ideas for including (or excluding) names in my rsync command, but nothing i can think of seems to be working properly. I would appreciate any help.

Panos


Here is how i RSYNC my Fedora Repos to my Samba server


rsync -avrt rsync://mirror.anl.gov/fedora/linux/updates/12/x86_64/ --exclude=debug/ /var/www/html/Fedora/updates/12/x86_64


Is your remote source rsync'able?


All times are GMT -5. The time now is 07:50 PM.