Skip to main content

rt state restore

rt › state › restore

Restore state.db from a local copy or from encrypted backup (--from-backup). Refuses while the daemon is running unless --force.

Usage

rt state restore <copy> [flags]

Arguments & flags

Flag / ArgTypeDefaultDescription
<copy>textBackup filename (under rt state's backups dir) or an absolute path
--forcebooleanfalseOverride the running-daemon refusal (state.db is shared and WAL-mode; stop the daemon instead when possible)
--jsonbooleanfalsePrint the outcome as JSON
--from-backupbooleanfalseRestore from the encrypted backup in the home repo instead of a local stamped copy
--onlytextRestore only this app's backup (rt, board, gitq)
--attextRestore the backup at this timestamp instead of the latest
--identitytextPath to an age identity file (team key restore on a new machine with no keychain key yet)
--dry-runbooleanfalseShow what --from-backup would restore without changing anything

See code: commands/state.ts › stateRestore

Examples & notes

Restores state databases from a local stamped copy or from the encrypted backup in the home repo.

# From encrypted backup (most common)
rt state restore --from-backup

# Restore only one app
rt state restore --from-backup --only rt

# Point-in-time restore
rt state restore --from-backup --at 2026-09-10

# New machine with no keychain key
rt state restore --from-backup --identity ~/team-key.txt

# Preview without writing
rt state restore --from-backup --dry-run

# From a local stamped copy
rt state restore state-2026-09-13T12-00-00.db

The daemon must be stopped before restoring. The command refuses otherwise unless --force is passed.

See the State backup guide for the full restore flow.