rsync command exclude option

Kaushal Shriyan kaushalshriyan at gmail.com
Thu Nov 27 05:19:23 GMT 2008


On Wed, Nov 26, 2008 at 7:05 PM, Michal Soltys <soltys at ziu.info> wrote:

> Kaushal Shriyan wrote:
>
>> I want only .sql files to be rsynced to the destination host.
>>
>> when i do rsync -avz oldUnicelFiles hostB:/home/kaushal
>> --include-from=include.txt
>> it rsync all the files under oldUnicelFiles, I mean even .gz and .txt
>> files too.
>>
>> ~/oldUnicelFiles $ ls
>> 01-07-2008_LOG.txt.gz  01-08-2008_LOG.txt  02-09-2008_LOG.txt.sql
>> ~/oldUnicelFiles $
>>
>> cat include.txt
>> #####################
>> /oldUnicelFiles/*.sql
>> #####################
>>
>> am i missing something
>>
>>
> Include is rsync's default action, if no explicit pattern that would
> override it is specified.
>

Hi again

I have a directory logfiles and inside it it has lots of sub directories.
Inside it there are lots of .gz, .txt and .sql files
I want only .sql files to be rsynced to the destination host

is there a way to achieve it using rsync utility

Thanks and Regards

Kaushal
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list