Join our Newsletter — 33% off our NHI Course

Conflict Strategy

Conflict strategy is the restore behavior used when a backup contains a relationship that already exists in the destination system. In SpiceDB, it determines whether the restore fails, skips the duplicate, or applies touch semantics. The setting matters because restore is a write-heavy process that may encounter pre-existing data.

What Conflict Strategy Controls During Restore

Conflict strategy is the restore-time decision rule for already-existing relationships. In a relationship-heavy system like SpiceDB, the control determines whether restore halts on duplicates, skips them, or treats the incoming record as a touch update.

This matters because restore is not just data copying, it is reintroducing authorization state into a live destination. The same backup can therefore be correct in content but still fail operationally if the target already contains overlapping tuples.

How the Restore Modes Differ

The three common behaviors are easy to reason about, but they have different consequences. A fail strategy preserves strictness and surfaces overlap immediately, a skip strategy prioritises continuity, and touch semantics updates the existing relationship instead of treating it as a hard conflict.

Those modes are not interchangeable. The right choice depends on whether you want the restore to act like an integrity check, a merge, or a reconciliation step. In practice, the strategy determines how much trust you place in the backup being the sole source of truth for that restore run.

Because relationship data often changes while backups are being taken, duplicates can be legitimate rather than pathological. A conflict strategy therefore has to handle normal drift as well as operator error, which is why the setting is part of restore behavior rather than a generic backup option.

Why Conflict Strategy Matters Operationally

Restore workflows often run under time pressure, after an outage, migration, or data correction. A poorly chosen strategy can either stop recovery unnecessarily or silently accept overlap that hides inconsistency in the destination system.

For systems that enforce authorization through relationships, the restore path is especially sensitive because even one duplicate or stale tuple can affect effective access. The operational question is not only “did the backup load,” but “did the resulting relationship set match the intended state.”

Restoring Relationship Data Safely

Choose the mode based on the recovery goal, not on convenience. If the restore is supposed to recreate a known historical snapshot, fail-on-conflict is the strongest signal that the destination differs from expectation. If the restore is being used to converge state after partial drift, skip or touch may be the better fit.

What to watch for: conflict strategy becomes important whenever backups are restored into a system that may already contain live writes, partial imports, or independently created relationships. In those cases, the restore process is as much a consistency decision as a backup operation.