What is the correct usage of syncoid --use-hold when syncing to and from multiple targets

See title. I’d like to understand the proper user of syncoid --use-hold when syncing to and from multiple targets. I am also using --identifier.

In case it matters this is the setup I have:

A[a] → B[a]
A[b] ← B[b]
B[a,b,c] → C[a,b,c]

B to C is setup in a pull configuration (cron on C).
Because reasons B does push and pull to/from A (cron on B).

Capital letters are machines and lowercase letters are datasets.

--use-hold is pretty forgiving towards multiple targets. Holds will be created on the source.

--use-hold will create a hold on the latest synced snapshot with the name syncoid_${identifier}${hostname}. If there was an matching snapshot that was used for incremental syncing it will also release the hold of the same name on the matching snapshot. The hostname is the machine that runs syncoid.

For your use cases, there will be holds on A[a], B[b] for the B push/pull with names syncoid_${identifier}B, and there will be holds on B[a], B[b], and B[c] with the names syncoid_${identifier}C for the C pulls.

1 Like

Thanks for confirming.

So then I would want to leave OUT any of the --*-sync-snap options. And the syncoid_${identifier}* snapshots would get automatically held and subsequently deleted as necessary?

--no-sync-snap is okay to use with --use-hold, the holds will be placed on the latest snap that is replicated.

--keep-sync-snap also works with --use-hold, holds will be removed from the syncoid-sync-snaps, but syncoid won’t prune the syncoid-sync-snaps.