Skip to content

Backup and Restore

Create and restore install-directory backups of SafeCall data.

safecall app backup

Creates a timestamped backup under {install_dir}/backups/.

Usage

bash
sudo ./util.sh app backup
sudo ./util.sh app backup --dir backups
sudo ./util.sh app backup --dry-run

Behavior highlights

  • Creates {install_dir}/backups/YYYY-MM-DD_HHmmss/ with:
    • metadata.txt — JSON metadata
    • core.tar.gz — database snapshots, config, and small text files
    • assets.tar.gz — maps and bug-screenshots, or a symlink to a prior identical archive
  • Uses online SQLite backup (VACUUM INTO) so the service can keep running.
  • Excludes logs/ and the backups/ directory itself.
  • Reuses prior assets.tar.gz via symlink when map/image content is unchanged.

safecall app restore

Restores database, config, and assets from a backup directory.

Usage

bash
sudo ./util.sh app restore
sudo ./util.sh app restore --from backups/2026-07-08_000000
sudo ./util.sh app restore --yes

Behavior highlights

  • Defaults to the latest backup in {install_dir}/backups/.
  • Stops the SafeCall service before restore and starts it afterward.
  • Runs selftest after restore unless --skip-selftest is passed.
  • Prompts for confirmation unless --yes is passed.

When to use

  • Disaster recovery on a production install.
  • Rolling back config/database/assets after a bad change.
  • Verifying backup integrity in a staging environment.