problems with telling rsync what to delete
erik at toltech.nl
Wed Jun 1 12:24:17 GMT 2005
On Tue, 2005-05-31 at 10:54 -0700, Wayne Davison wrote:
> > The exclude file list has filenames that are relative to the source
> > directory supplied to rsync, so that would be correct.
> If the files are still be deleted, then you've got some kind of an error
> in the contents of your --exclude-from file. You can either experiment
> with changes to fix it or ask a more specific question that includes
> both the --exclude-from line that you think should be working and the
> full path of a file that you think should not be deleted.
I just fixed my problem.
The full command I run is:
/usr/bin/rsync --rsh=ssh -p -o --delete-after --recursive --links
--times --compress --verbose --stats --backup
--exclude-from=/home/erik/backup/temp/unchangedlist /home/erik/backup/temp/store erik at remote:/home/erik/current
So basically I want to backup /home/erik/backup/temp/store, and in this
directory I've created the structure I want to backup, so a possible
file to backup is /home/erik/backup/temp/store/home/erik/
The file /home/erik/backup/temp/unchangedlist is:
Rsync sees 'store' as the directory to backup, therefore I either had to
put a trailing / on that to let it use the contents of store or prepend
all the filenames in unchangedlist with /store.
Everything now works as expected, thanks for the suggestion.
More information about the rsync