Hello - I just finished doing a search of the archives and couldn't seem to get this answered. Example, I have a root directory containing the following directories: /Test1 /Test2 /Test3 I want to rsync only /Test2 and all subdirs under. So my include-from file looks like: + Test2/* - /* This doesn't work as nothing is synced, and if I do a -vv it tells me that nothing is being synced because I've excluded all. What am I doing wrong?? Thanks, Max
On Sun, Aug 03, 2003 at 01:35:22AM -0500, Max Kipness wrote:> Hello - > > I just finished doing a search of the archives and couldn't seem to get > this answered. > > Example, I have a root directory containing the following directories: > > /Test1 > /Test2 > /Test3 > > I want to rsync only /Test2 and all subdirs under. So my include-from > file looks like: > > + Test2/* > - /* > > This doesn't work as nothing is synced, and if I do a -vv it tells me > that nothing is being synced because I've excluded all.I'm sure it didn't say that. Instead it would have spit out a bunch of lines including: excluding directory Test2 because of pattern /* That is because you never included Test2, only everything under it. | + Test2/ | - /* Would be what you want. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
Thanks for the info. I actually did not specify my configuration right so that it is where I was going wrong. However, I'm still not able to only rsync /Test2. My root directory is: /Rootdir And then subdirectories of /Rootdir are: /Test1 /Test2 /Test3 To get only /Test2, I tried the following in the include-only file: + Rootdir/Test2/ - /* This syncs nothing and gives me: excluding directory Rootdir because of pattern /*. Thanks, Max> -----Original Message----- > From: jw schultz [mailto:jw@pegasys.ws] > Sent: Sunday, August 03, 2003 2:05 AM > To: rsync@lists.samba.org > Subject: Re: Include-from ? > > > On Sun, Aug 03, 2003 at 01:35:22AM -0500, Max Kipness wrote: > > Hello - > > > > I just finished doing a search of the archives and couldn't seem to > > get this answered. > > > > Example, I have a root directory containing the following > directories: > > > > /Test1 > > /Test2 > > /Test3 > > > > I want to rsync only /Test2 and all subdirs under. So my > include-from > > file looks like: > > > > + Test2/* > > - /* > > > > This doesn't work as nothing is synced, and if I do a -vv > it tells me > > that nothing is being synced because I've excluded all. > > I'm sure it didn't say that. Instead it would have spit out > a bunch of lines including: > excluding directory Test2 because of pattern /* > That is because you never included Test2, only everything > under it. > > | + Test2/ > | - /* > > Would be what you want. > > > > -- > ________________________________________________________________ > J.W. Schultz Pegasystems Technologies > email address: jw@pegasys.ws > > Remember Cernan and Schmitt > -- > To unsubscribe or change options: > http://lists.samba.org/mailman/listinfo/rsync > Before posting, > read: http://www.catb.org/~esr/faqs/smart-questions.html >
There is more to it than that. I'm working on a perl script that backs up many hosts and I wan't to be able to only modify the include/exclude file for each host. The rsync commands run though a look for each host. Thanks, Max> -----Original Message----- > From: Johannes Liedtke [mailto:lists@liedtkeweb.de] > Sent: Sunday, August 03, 2003 8:33 AM > To: rsync@lists.samba.org > Subject: Re: Include-from ? > > > On Sunday 03 August 2003 15:14, Max Kipness wrote: > > Thanks for the info. I actually did not specify my > configuration right > > so that it is where I was going wrong. However, I'm still > not able to > > only rsync /Test2. > > > > My root directory is: > > > > /Rootdir > > > > And then subdirectories of /Rootdir are: > > > > /Test1 > > /Test2 > > /Test3 > > > > To get only /Test2, I tried the following in the include-only file: > > > > + Rootdir/Test2/ > > - /* > > > > This syncs nothing and gives me: excluding directory > Rootdir because > > of pattern /*. > > Maybe I missed something important here, but what's keeping > you from just > using: > rsync -az /Rootdir/Test2/ /somebackupDir/ > > This would only sync the contents of Test2 to somebackupDir. > For your task (as you described it) there's no need for > --include or --exclude > options... > > Hansen > > -- > Powered by SuSE 8.1pro - KDE 3.0.3 - KMail 1.4.3 > > It never ceases to amaze me how many people can't read instructions. > - Renze de Ruiter on kde-linux > > -- > To unsubscribe or change options: > http://lists.samba.org/mailman/listinfo/rsync > Before posting, > read: http://www.catb.org/~esr/faqs/smart-questions.html >