Skip to Content
Commands

backup

Write the one file a restore reads into a new directory.

traj backup writes the one file a restore reads, traj.jsonl, into a new directory. It is the canonical JSONL export under a name that says what it is for. CSV and Markdown do not restore, so backup has no --format flag.

  • --out <string> — a directory to create; it must not already exist; required
traj backup --out backup                # Write traj.jsonl, the restorable copy.
traj backup --out backup --json         # Describe the file written and its rows.

Restore the copy with traj restore. Before removing the stored data with traj data remove, take a fresh backup: the removal only proceeds when the backup holds exactly the data as it is now.

See Commands for the global options, exit codes and error envelope.