Rsync sometimes decides to delete all data

freebsd at freebsd at
Tue Jun 9 06:46:35 UTC 2020


I run into some really strange case I haven't seen so far over the 
I syncing a lot of different macines, raspberry pis to a backup server 
Lately one of them misbehaves.

Server rsync:  rsync  version 3.1.2  protocol version 31
Client rsync:  rsync  version 3.1.3  protocol version 31

Command used:
rsync --numeric-ids --delete --delete-excluded --delete-after -f "merge 
${BUFFER}" --stats  -e "${SSH_CMD}" root@${BACKUP_HOST}:/ $BACKUPROOT/

Sometimes when I run this script from the server it just decides to 
delete ALL files what it already have and sync is done.

I run it again couple of minutes after it syncs everything.

What can cause such a behavior? I can of course remove the delete 
directives but then the local copy will become messy over time and this 
perfectly works with all other machines.

It is not even that it cannot connect with rsync timeout and then it 
decides to delete the data. It can connect then decides to delete all 
data and done.

Rsync is run by root in any case so it's not a privilege problem.

Any ideas?

More information about the rsync mailing list