deleting remote dirs I no longer want to backup
christophe.lyon at st.com
Mon Jan 23 12:06:03 GMT 2006
Wayne Davison wrote:
> On Fri, Jan 20, 2006 at 07:30:00PM +0100, Christophe LYON wrote:
>> My original command was:
>> rsync -aR --exclude=dirb --exclude-deleted dira dirb /tmp
> I assumed the -R was unneeded because dira and dirb have no path
> information. If that info was elided, then things may become much more
> complicated because you need to send the parent dir of the dir you want
> to delete (since rsync only deletes in directories that it sends).
Thanks for your helpful replies.
However, I don't understand well you last comment (rsync only deletes in
directories that it sends).
Consider that I want to transfer:
If I use: rsync -vaR */rel-1.0 /tmp/test-rsync/
Now, if I decide I want to remove the *.c files,
rsync -aRnv --exclude="*.c" --delete-excluded */rel-1.0 /tmp/test-rsync/
So, if I decide I want to remove rel-1.0 instead, I intended to use
rsync -aRnv --exclude="rel-1.0" --delete-excluded */rel-1.0 /tmp/test-rsync/
which does not work.
Why is the 2nd case different from the 1st one?
More information about the rsync