I run my rsync backups without the --delete flag just in case something is deleted accidentally. In my logs with the -v flag I simply get informed of a change in the parent directory of the deleted file, so I cannot tell what file was affected. When I use the -vvv flag, I get no descriptive information that separates the deleted file from the rest of the files. Same when including --itemize-changes.
I am trying to find a way to get updated in my logs when a file was deleted on my host machine even though I do not want it deleted on my target machine. I want to be able to check what was deleted every so often before running the --delete flag manually. I want to run the rsync log info through a simple script to make a list of 'deleted' files (files deleted only on machine a but not machine b), but cannot find the information that basically says "a file was deleted on machine a but not making any changes to the backup on machine b.
My commands:
rsync -avz -e ssh /files/to/backup [email protected]:/Target/backup/file --log-file=/path/to/log -q
or
rsync -avvvz -e ssh /files/to/backup [email protected]:/Target/backup/file --log-file=/path/to/log -q
Use
--delete
together with--dry-run
in your command.From
man rsync
: