Why do you care about loosing data if you may only loose local copy? Also, rsync have -n
option, which is dry run - it will print everything it would do, but will not perform any changes.
Also, if you're too afraid losing local copy (maybe data is too large to re-download), you could use -b
option, which will rename files to filename~
instead of deleting it.
Anyway --delete
is what you need, and even maybe --delete-excluded
.