exclude an excluded file from being deleted by --delete-excluded

Craig Hammond Craig at sbisolutions.com.au
Thu Feb 9 06:35:11 GMT 2006


Hi,
I have a particular directory in my exclude list, but I want it excluded
from --delete-excluded.
Is this possible.
or maybe if I explain what I'm trying to do, someone will come up with a
more suitable way.
 
I am using rsync (2.6.6) to backup data from a Windows Server (cygwin)
to an OpenBSD box.
 
rsync -rtvz --delete-excluded --del --timeout=3600 -e "ssh -i
c:\cygwin\ssh-key" --exclude-from=/cygdrive/d/rsync/rsync-d-exclude.txt
--bwlimit=5 /cygdrive/d
user at rsync.example.net.au:/var/rsync/user/backup/server

So basically, I'm backing up the whole D: drive of the windows server
except for what I exclude.

I run this at about 6pm to capture all the data from the days work. One
of the directories I exclude has a database in it as it is always still
in use at this time. At about 2am, I run another instance of rsync to
copy just the directory containing the database.
My problem is that as the database directory is in the exclude list, it
gets deleted because of the --delete-excluded. I do however want the
--delete-excluded active for the remainder of the directories.

Thanks,
Craig.




More information about the rsync mailing list