Skip to content

Backup & Restore

Fluent OSS supports snapshot-based backup and restore. The snapshot format is JSON and is compatible across deployment tracks, so you can move data between OSS instances, import from Hosted, or back up before upgrades.

Export a Snapshot

Default SQLite Backend

bash
npm run oss:export:snapshot -- --out "./tmp/fluent-oss-snapshot.json"

Postgres + S3 Backend

bash
npm run oss:export:snapshot -- --backend postgres-s3 \
  --out "./tmp/fluent-oss-postgres-s3-snapshot.json"

From Fluent Hosted

Export your data from the hosted service:

bash
npm run export:snapshot:hosted -- --database fluent-hosted \
  --out "./tmp/fluent-cloud-snapshot.json"

Import a Snapshot

Into Default SQLite Backend

bash
npm run oss:import:snapshot -- --file "./tmp/fluent-oss-snapshot.json"

Import into a specific root:

bash
npm run oss:import:snapshot -- --root "./tmp/fluent-restore" \
  --file "./tmp/fluent-oss-snapshot.json"

Into Postgres + S3 Backend

bash
npm run oss:import:snapshot -- --backend postgres-s3 \
  --file "./tmp/fluent-oss-postgres-s3-snapshot.json"

From Hosted into OSS

bash
npm run oss:import:snapshot -- --file "./tmp/fluent-cloud-snapshot.json"

The snapshot format is aligned between Hosted and OSS, so the same JSON artifact works for all import paths.

What Is Included

The snapshot contains:

  • All relational rows (profiles, domains, plans, recipes, items, workouts, metrics, etc.)
  • Artifact metadata (references to photos and files)

What Is Not Included

  • Artifact binary bytes are not embedded in the snapshot JSON
  • Moving binary content between storage backends remains an operator workflow

Common Scenarios

Back Up Before Upgrading

bash
npm run oss:export:snapshot -- --out "./tmp/fluent-backup-$(date +%Y%m%d).json"
git pull
docker compose --env-file .env.oss up --build

Restore to a New Host

On the old host:

bash
npm run oss:export:snapshot -- --out "./tmp/fluent-snapshot.json"

Copy the snapshot file to the new host, then:

bash
npm run oss:import:snapshot -- --file "./tmp/fluent-snapshot.json"
npm run oss:start -- --host 127.0.0.1 --port 8788

Migrate from Hosted to Self-Host

bash
# Export from hosted
npm run export:snapshot:hosted -- --database fluent-hosted \
  --out "./tmp/fluent-cloud-snapshot.json"

# Import into OSS
npm run oss:import:snapshot -- --file "./tmp/fluent-cloud-snapshot.json"

# Start OSS
npm run oss:start -- --host 127.0.0.1 --port 8788

Migrate Between Storage Backends

Export from SQLite:

bash
npm run oss:export:snapshot -- --out "./tmp/fluent-migrate.json"

Import into Postgres + S3:

bash
npm run oss:import:snapshot -- --backend postgres-s3 \
  --file "./tmp/fluent-migrate.json"

TIP

Relational rows and artifact metadata move cleanly between backends. Artifact bytes themselves need to be migrated separately if you are changing storage backends.

Apache 2.0 Licensed (Self-Host) | Fluent Cloud coming soon