Rsync sometimes decides to delete all data

Kevin Korb kmk at sanitarium.net
Tue Jun 9 07:13:02 UTC 2020


The only time I have seen something like that was when I was using rsync
to backup a snapshot and something went wrong in the snapshot creation
resulting in me rsyncing an empty dir instead of a mounted filesystem.
Does the --stats output imply that rsync saw an empty dir?

On 6/9/20 2:46 AM, freebsd--- via rsync wrote:
> Hello,
> 
> I run into some really strange case I haven't seen so far over the years.
> I syncing a lot of different macines, raspberry pis to a backup server
> nightly.
> 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?
> 

-- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			https://sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/rsync/attachments/20200609/e1320f93/signature.sig>


More information about the rsync mailing list