Hello, I'm configuring rsync to use --exclude-from option however it doesnt work as I want to. I have a directory /source/ which contains additional directories a, b, c. In addition /source/ directory contains some db.* files that I dont want to backup. The tricky part is that subdirectories /source/a, /source/b and /source/c can have their own db* files wich I do want to keep. so how should my exclude file look? I'm executing rsync from a source system as follows: rsync -avz --exclude-from=/etc/rsync_exclude.file --delete --delete-excluded /source/ remote:/source/ thanks, aleksey
On Mon, Jun 20, 2005 at 02:48:35PM -0700, Aleksey Zakharov wrote:> I have a directory /source/ which contains additional directories a, b, c. > In addition /source/ directory contains some db.* files that I dont want to > backup. The tricky part is that subdirectories /source/a, /source/b and > /source/c can have their own db* files wich I do want to keep. > > so how should my exclude file look?If you anchor your excludes, they will only apply at the base of the transfer: - /db* That will not transfer the db* files in "/source/", but will transfer any others. ..wayne..