LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsync exclude file list question (https://www.linuxquestions.org/questions/linux-newbie-8/rsync-exclude-file-list-question-4175541597/)

jzoudavy 05-04-2015 11:56 AM

rsync exclude file list question
 
hi experts

I am running a large rsync job, but the exclude list doesn't seem to be working:

The rsync log shows this file as being copied over
/a/test 4.11/Logs/2015-03-03_PID_1234/x.y

but the exclude file clearly includes this line:
/a/test*/Logs/*PID*

So shouldn't it have been excluded?
Thanks

jlinkels 05-04-2015 12:02 PM

The rsync log shows /a/test....
Your exclude specifies a/test...

So according to rsync that is different.
Check also on quoting. I am not sure whether or not you need quotes for file names with wildcards.

jlinkels

jzoudavy 05-04-2015 01:06 PM

Hi, sorry, that was typo on my part, they should all be being with /. I have fixed that.

jlinkels 05-04-2015 02:04 PM

I am baffled. I reproduced your problem. When I specify your exclude pattern on the command line with --exclude, the exclude works fine. However, putting the exclude pattern verbatim in a file and then using --exclude-from=FILE does not exclude.

jlinkels

jzoudavy 05-04-2015 02:38 PM

I am trying right now to simplify the rule to just this:

/a/test*/Logs/*

I will find out later, because there is a ungodly amount of stuff to rsync.

jlinkels 05-04-2015 02:48 PM

Like I said, --exclude=<pattern> on the command line worked, so as a workaround you can specify multitple patterns on the command line.

jlinkels

jzoudavy 05-04-2015 03:13 PM

hey i found that according to this link, the exclude path is relative, I am testing it now

http://www.thegeekstuff.com/2011/01/...s-and-folders/

jlinkels 05-04-2015 06:21 PM

I did use the relative path.

jlinkels

jzoudavy 05-04-2015 06:23 PM

mine wasn't... and now it works :D


All times are GMT -5. The time now is 06:15 AM.