LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2015, 12:56 PM   #1
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

Rep: Reputation: Disabled
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

Last edited by jzoudavy; 05-04-2015 at 02:05 PM.
 
Old 05-04-2015, 01:02 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
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
 
Old 05-04-2015, 02:06 PM   #3
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

Original Poster
Rep: Reputation: Disabled
Hi, sorry, that was typo on my part, they should all be being with /. I have fixed that.
 
Old 05-04-2015, 03:04 PM   #4
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
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
 
Old 05-04-2015, 03:38 PM   #5
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-04-2015, 03:48 PM   #6
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

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

jlinkels
 
Old 05-04-2015, 04:13 PM   #7
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

Original Poster
Rep: Reputation: Disabled
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/
 
Old 05-04-2015, 07:21 PM   #8
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
I did use the relative path.

jlinkels
 
Old 05-04-2015, 07:23 PM   #9
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

Original Poster
Rep: Reputation: Disabled
mine wasn't... and now it works
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting last X files, by modified date to build Rsync file list nadigo Programming 1 04-26-2012 05:26 AM
rsync Include/exclude based on pattern & file size? Geremia Linux - Software 1 01-20-2012 09:49 PM
Rsync - Exclude single file problem LinuxLuva Linux - Software 3 11-08-2007 10:34 AM
What files to exclude when using rsync TongueTied Linux - General 2 07-20-2006 09:39 PM
rsync exclude list steelhead79 Linux - Software 3 01-14-2005 01:10 PM


All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration