I use rsync with great pleasure for backing up my servers, although I do have a question about the --delete-excluded
parameter.
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded --rsh=/usr/bin/ssh root@server01:/etc /.snapshot/hourly.0/server01
From man rsync
:
--delete-excluded also delete excluded files from dest dirs
To me, a non English native, this means that rsync will delete excluded directories from the actual destination directory on the remote server, so if I have /home/backup
and /home/settings
in my exclude-folders, those folders would actually be removed from the remote server,.
From several other resources it seems that it will delete the files from the local backup folder in order to save space. For example you can create small back-ups on the server itself and exclude this data, so you won't waste storage space.
It is vital for me though that rsync will do it's job only one-way as people say it's meant to work, I do not want to take any risks in having software that deletes files/directories on the remote server.