Delete old files?

Brad rsyncuser at
Tue Jun 25 18:53:01 EST 2002

I have Rsync working ok, backing up some server directories onto another 
server each evening. If I do an rsync back up of a directory - called "test", 
for example - and in the "test" directory there is a file called "testfile", 
it gets backed up OK.

However, if that file, "testfile" gets deleted from the original "test" 
directory, when I run rsync again and the backup completes, "testfile" is not 
copied, but it still remains on the destination rsync server from the last 
rsync backup before it was deleted. And so over time as files are deleted 
from the orginal "test" directory, the backup destination directory will 
become more and more out-of-date, with lots of old and deleted files there.

Other than deleting all the files in the destination directory before rsync is 
run, is there any way to ensure that the backed up (destination) directory is 
exactly the same as the current live "test" directory?

Brisbane, Australia

More information about the rsync mailing list