On Wed, Nov 26, 2008 at 5:28 PM, Michal Soltys <[EMAIL PROTECTED]> wrote:
> Kaushal Shriyan wrote: > >> Hi >> >> I do rsync -avz oldUnicelFiles hostB:/home/kaushal >> --exclude-from=exclude.txt >> but it rsynced the excluded files too >> >> my exclude.txt file contains >> #################### >> /home/kaushal/oldUnicelFiles/*.gz >> /home/kaushal/oldUnicelFiles/*.txt >> #################### >> >> Any ideas as what am i doing wrong >> >> > From rsync perspective, root of file transfers in your case would be > /home/kaushal , not / . So ... > > /oldUnicelFiles/*.gz > /oldUnicelFiles/*.txt > > ... should do the thing. > > If you used 'oldUnicelFiles/' instead of 'oldUnicelFiles' in rsync > invocation, the root would be /home/kaushal/oldUnicelFiles/ . > > > > A note of warning if you plan on doing deletions in the future: > > rsync -avz --del oldUnicelFiles hostB:/home/kaushal > > ... would remove all files not existing on sending side, in > hostB:/home/kaushal/oldUnicelFiles/ > > ...but: > > rsync -avz --del oldUnicelFiles/ hostB:/home/kaushal > > ...would do the same in hostB:/home/kaushal/ > > Both of the above would also protect already existing files on the > receiving side, that match patterns in exclude.txt . > > > Be sure to read carefully rsync's man. > Thanks a Lot 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 Thanks and Regards Kaushal
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html