worker.durability-mode configuration option to prevent any log trimming during the transition, ensuring no data loss even if the old snapshots become unavailable before new ones are created.
Prerequisites:
- Restate server version 1.6 or later (required for
worker.durability-modeconfiguration) - Rolling restart capability for your cluster
- Access to both old and new snapshot storage backends during migration
- Capacity to temporarily run each partition on every worker node (partition replication = cluster size)
restatectlCLI configured to communicate with your cluster
Record current replication settings
Capture the current cluster replication settings so you can restore them later:Note the current Partition replication value (for example
{node: 2}).Temporarily increase partition replication to all nodes
Set partition replication to your cluster size Do not use
N (the number of worker nodes). This ensures every node has a local copy of every partition before you disable snapshots.--replication here unless you also want to increase log replication.Why increase partition replication?Without this step, when the cluster controller reconfigures partition replica sets during rolling restarts, some nodes may be unable to serve a given partition depending on their prior local partition store state, the log trim point, and available snapshots. With partition replication matching cluster size, every node will maintain a warm replica of every partition and is able to resume without the need for a new snapshot on restart, provided the log was not trimmed during its downtime.
Wait for replicas to catch up
Wait until every partition has a replica on every node and followers have no lag:Verify that:
- Each partition ID appears
Ntimes (once per node) - All rows show
LSN-LAGof0(or consistently near0)
Disable automatic log trimming
Roll out a configuration update to disable automatic snapshots and switch to conservative durability mode:This effectively disables both snapshotting and log trimming. The system will log a warning every 60 seconds: “Detected cluster environment with no snapshot repository configured. Automatic log trimming is disabled…” - this is expected during the migration.Perform a rolling restart of all cluster nodes with the new configuration. Restart one node at a time, waiting for it to rejoin and partitions to become active before proceeding to the next node.
restate.toml
Verify that log trimming has stopped
Check the cluster status to confirm all partitions are active:You should see all partitions with the The
ARCHIVED column empty or unchanged:ARCHIVED column shows - (due to no known snapshot). This is expected.The applied LSN should increase over time if there is cluster activity but the archived LSN should remain -:Configure new snapshot repository
Roll out a configuration update with the new snapshot destination:Perform a rolling restart of all cluster nodes (one at a time, verifying health between each).
restate.toml
Create snapshots in the new repository
Trigger manual snapshots for all partitions to populate the new repository immediately:You should see output confirming each partition was snapshotted:
Verify snapshots in the new storage backend
Check that snapshots exist in the new storage backend. For S3:Each partition should have a Confirm the archived LSN column now shows the snapshot LSN values:Expected output:
latest.json file and a snapshot directory:Restore partition replication
After the new snapshot repository is verified, restore the original partition replication value you recorded earlier:
Restore normal operations
Roll out a configuration update with production settings:Perform a rolling restart of all cluster nodes (one at a time, verifying health between each).
restate.toml
Verify normal operations
Check that the cluster status is healthy:All nodes should be healthy and all partitions active with no warnings.Confirm log trimming has resumed:The trim point should gradually increase as durability conditions are met.
Durability mode reference
| Mode | Description | Use case |
|---|---|---|
balanced | Requires snapshot AND at least one replica flushed | Production default (when snapshots configured) |
snapshot-and-replica-set | Requires snapshot AND all replicas flushed | Migration phase (strictest) |
snapshot-only | Requires only snapshot, ignores replicas | Special cases |
replica-set-only | Requires all replicas flushed, ignores snapshots | Default without snapshots |
none | Disables automatic durability tracking | Testing only |