Backup
Runningsubstrate backup writes a timestamped .tar.gz into .substrate/backups/ and prints the path so you know exactly what was created.
Substrate v0.7.0 has no automatic retention or pruning. Backups accumulate in
.substrate/backups/ until you delete them manually.Export
Export produces the same archive asbackup, written to a path you control. Use it to move a project between machines or to hand a substrate to someone else in full — both the workflow definition and the runtime state travel together.
Import
Import restores an archive into.substrate/. Two safeguards prevent you from accidentally overwriting live or existing data.
1
Check for an existing project
If a
config.json is already present in .substrate/, import refuses unless you pass --force. This prevents a silent overwrite of a project you did not mean to replace.2
Check for a live server
If a running
substrate serve holds the PID file, import refuses outright — writing over a live database would corrupt it. Stop the server before importing.3
Extract safely
Archives are validated against path traversal before any files are extracted.
What to Commit
Not everything in.substrate/ belongs in version control. The table below shows the boundary.
Export and import are the supported way to move task state across that boundary — SQLite files are not safe to commit or diff directly.