[lug] exclude one file rsync

dio2002 at indra.com dio2002 at indra.com
Fri Nov 12 11:30:45 MST 2010


fwiw, i was trying to do some filtering with tar recently and it was a
royal pita.  i can't remember the details but i spent all day trying to
configure a multiple exclude, but in the end the man pages never seemed to
work as advertised.  iirc, the exclude filters in rsync can be kind of
tricky too.  know it's not much help just thought i'd add that this can be
confusing and maybe even inaccurate.

> No that didn't work. I had to use
>
> --filter='- config.php'
>
> --exclude seems to be for directories
> or for pattern matching but it did not
> work for a single file name.
>
>
>
>
> On 11/11/2010 10:52 PM, Jason Schaefer wrote:
>> Paul
>>
>> Can't you use --exclude 'config.php' ??
>>
>> On Thu, Nov 11, 2010 at 1:31 PM, Paul Nowosielski
>> <paulnowosielski at yahoo.com> wrote:
>>
>>>
>>> Ok I got it:
>>>
>>> --filter='- config.php'
>>>
>>> Thanks!
>>>
>>> Paul
>>>
>>>
>>> ----- Original Message ----
>>> From: Paul Nowosielski <paulnowosielski at yahoo.com>
>>> To: lug <lug at lug.boulder.co.us>
>>> Sent: Thursday, November 11, 2010 13:11:03
>>> Subject: [lug] exclude one file rsync
>>>
>>> Hi,
>>>
>>> I'm trying to exclude on file during rsync.
>>> I just can't seem to be able to get it to work.
>>>
>>> my exclude is this:
>>>
>>> --exclude '.svn' --exclude 'dedup/ddproc/upload/' --exclude '*.log'
>>> --exclude
>>> 'config.php' "
>>>
>>> I'm trying not to sync config.php because the DB hosts are different on
>>> the
>>> servers.
>>>
>>> Any insight?
>>>
>>> Thank you,
>>>
>>> Paul
>>>
>>>
>>>
>>> _______________________________________________
>>> Web Page:  http://lug.boulder.co.us
>>> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>>> Join us on IRC: irc.hackingsociety.org port=6667
>>> channel=#hackingsociety
>>>
>>>
>>>
>>> _______________________________________________
>>> Web Page:  http://lug.boulder.co.us
>>> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>>> Join us on IRC: irc.hackingsociety.org port=6667
>>> channel=#hackingsociety
>>>
>>>
>> _______________________________________________
>> Web Page:  http://lug.boulder.co.us
>> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>>
>>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>




More information about the LUG mailing list