Solved syncoid stuff keeps piling up for some reason

I'm doing
Code:
syncoid -r sourcepool backuppool
The snapshots are created, backed up, and the old snapshots are removed. All good. Everything completes normally.
But sourcepool accumulates these
Code:
sourcepool@syncoid_freebsd_datetime
snapshots for each run of syncoid.
The normal behavior is not to have them accumulate...and to have them be deleted, but that's not happening.
 
I don't know if it's related but every time I run syncoid it gives me
Code:
CRITICAL ERROR: Target backuppool exists but has no snapshots matching with sourcepool! 
Replication would require destroying existing target. 
Cowardly refusing to destroy your existing target.
but does proceed and create and transfer all snapshots for datasets inside the pool.
 
And that critical error is exactly the root (mind the pun) of the problem:
Syncoid tries to sync a pool root to a pool root. You technically cannot perform a full zfs recv into the root dataset of a pool if it already exists.

Solution: sync to a container dataset.

Code:
syncoid -r sourcepool backuppool/sourcepool

Syncoid will create a new dataset named sourcepool inside the backup pool. Since it's just a normal dataset, syncoid has full control over it. The sync succeeds and teh cleanup code will run (no more accumulating snapshots of any kind).
 
Back
Top