LapInsight runs offline at the track. Your database holds every session, note, marker, and metadata pointer — losing it is far more painful than losing a video file (which usually still exists on the original SD card or drive). The Backup & Restore tools are the safety net: a one-click snapshot before risky actions, and a non-destructive restore when something goes wrong.
Backup Now
File → Backup Now... snapshots the live database to:
`` <data_root>/_backups/<YYYYMMDDTHHMMSSZ>__manual.sqlite <data_root>/_backups/<YYYYMMDDTHHMMSSZ>__manual.json ← identity sidecar ``
The sidecar JSON records:
| Field | What it captures |
|---|---|
schema_version | The highest applied migration (e.g. 052_owner_user_id). Restore refuses to overwrite a newer local schema with an older backup. |
app_version | LapInsight version that wrote the backup, from config/app_version.txt. |
data_root | Absolute path of the data root the backup was taken from. |
qsettings | Active QSettings dump (window state, theme, etc.) — only populated when invoked from the GUI. |
media_roots | Distinct parent directories referenced by days.day_folder_path, sessions' session_path, and videos.file_path, each with an exists flag. |
The DB is the unit of backup. Media bytes are NOT in the backup — videos and documents stay where they are on disk. Trackside laptops can't snapshot multi-GB media on demand, and on-disk files are individually addressable already. The sidecar's media-root inventory lets restore tell you if you're on a machine where some of your media won't be reachable.
Automatic backups
LapInsight auto-creates a backup before every destructive operation:
| Trigger | Backup reason tag |
|---|---|
File → Advanced → Merge Partial Database (legacy)... | pre-merge |
File → Import Library Bundle... (real import; not Preview) | pre-bundle-import |
File → Restore from Backup... in Replace mode | pre-restore |
If you ran a merge or import and want to undo it, the most recent automatic backup is sitting right there in _backups/.
Restore from Backup
File → Restore from Backup... opens a picker showing every backup with its date, reason, schema version, app version, and a media-status indicator (✓ if every recorded media root still exists, "N missing" otherwise).
Two modes:
Restore as copy (recommended)
Writes the backup to <data_root>/LapInsight.restored-<iso>.sqlite and leaves your active database untouched. You're free to inspect the restored file (open it in a SQLite browser, compare contents, etc.) before deciding whether to switch.
To switch to the restored copy: close LapInsight, rename the restored file over LapInsight.db, and relaunch.
Replace current database
Atomically replaces the live database with the selected backup. Before doing so, LapInsight automatically takes a fresh pre-restore backup of the current state, so this remains reversible.
You'll be asked to restart LapInsight after a Replace so all in-memory state matches the restored DB.
Schema version safety
Restore refuses if the backup's schema version is newer than the local database — restoring it would crash the app, which doesn't yet know about the newer migrations. Upgrade LapInsight first.
Older-schema backups are allowed and will be migrated forward by the normal startup migration process after restart.
Missing media roots
If a backup's sidecar lists media root paths that don't exist on the current machine (e.g. you've restored on a different laptop, or your external drive is unplugged), the restore dialog shows a warning panel. The restore will still complete; sessions pointing at missing roots will simply show as offline until you reconnect the drive or relink files.
Where backups live
<data_root>/_backups/ — the same data root LapInsight stores everything in (Documents/LapInsight by default). Backups are SQLite files alongside JSON sidecars; you can copy them to external storage or another machine just like any other file.
What backups are NOT
- Not a transfer mechanism between installs. Different machines will likely have different
data_rootpaths and may not have the same media. Use Library Bundle for cross-machine transfer — it carries assets too. - Not a sync system. Backups are point-in-time snapshots. There's no continuous sync, no merge, no conflict resolution.
- Not encrypted. SQLite files are inspectable and copyable on purpose. If your data root is on a shared drive, treat the backup folder the same way.
Troubleshooting
- No backups visible in the picker — the
_backups/directory hasn't been created yet. Take a backup first viaBackup Now.... - Restore button stays disabled — confirm a row is selected; for Replace mode, also tick the "I understand" checkbox.
- "Schema is newer than local" — the backup is from a newer LapInsight version. Update the app first, then restart and try again.
See also
- Library Bundle — portable transfer between installs.
- Legacy Merge — the partial-merge importer in
File → Advanced. - Troubleshooting