User Guide
18.2 · Troubleshooting

Backup and Restore the Database

TX1 stores everything in a single SQLite database. Backing it up regularly is cheap and prevents catastrophic data loss.

What's In the Database

  • All projects (direct costs, overheads, resources, markup, allocations).
  • The master library.
  • Users, roles, permissions.
  • Carbon emissions and snapshots.
  • Notes and note images.
  • Code sets and allocations.
  • Project documents (attachments).
  • Audit logs.

The file is typically called tx1.db in %LocalAppData%\TX1\data\.

Automatic Backups

Configure in Settings → Database → Backup Schedule:

  • Daily at a time, weekly, or manual only.
  • Backup location (local path or network share).
  • Retention (keep last N backups).

Automated backups use SQLite's online backup API — safe while users are connected.

Manual Backup

Settings → Database → Backup Now:

  1. Choose a path.
  2. TX1 writes tx1_backup_YYYYMMDD_HHMMSS.db.
  3. Optional: create a parallel .tx1 export of every active project.

Per-Project Backup

For a specific project:

  • .tx1 export (section 13.4) — compressed, password-protected, one file.
  • JSON export (section 13.3) — human-readable.

Best for individual project archiving.

Restoring

Tip

Warning — Restoring overwrites the live database. Close TX1 first.

  1. Close TX1.
  2. Replace tx1.db with the backup copy (rename / move).
  3. Start TX1 — the splash screen will run migrations if the backup was older than the current schema.

Restoring a Single Project

Don't restore the whole database just for one project. Use:

  • Project → Import from .tx1 — restore from a project package.
  • Project → Import from JSON — restore from JSON export.

Schema Migrations

A backup from an older TX1 version may need migration. On first launch:

  • TX1 detects the schema version.
  • Runs forward migrations one at a time.
  • Shows progress and a backup prompt before starting.

Shared Database Profile

If you're on a shared database (multi-user), backups should be taken on the host / file share, not per-user. Local caches don't have the authoritative data.

Best Practices

  • Daily automatic backup to a different drive (not the primary).
  • Weekly off-site backup (cloud file sync, NAS replication, or physical media).
  • Monthly restore drill — restore to a throwaway location and verify it opens cleanly.
  • Always take a fresh backup before a TX1 version upgrade.

Recovery After Corruption

Symptoms: app won't start, "database is malformed" error, missing rows.

  1. Close TX1 immediately; don't attempt another write.
  2. Copy the current tx1.db to tx1_corrupt_<date>.db for forensic.
  3. Restore the most recent backup.
  4. Contact support with the corrupt copy attached.

SQLite WAL files (tx1.db-wal, tx1.db-shm) should be copied together with the .db — restoring without them can lose in-flight transactions.

Verifying a Backup

Settings → Database → Verify Backup runs PRAGMA integrity_check on the backup file — confirms it is readable before you need it.