Snapshots and What Changed?

Petti 1.4 · User documentation

Capture a baseline, perform an action in your app, then see which database rows changed. The comparison reads saved copies; it does not edit the source.

Capture a snapshot

  1. Open the source database and choose ⋯ → Create Snapshot….
  2. Review the estimated copy size and available space. Optionally give the snapshot a name.
  3. Choose Create Snapshot and wait for completion, or use Cancel.

Petti uses SQLite’s backup API, including committed data in a WAL. It does not simply copy the main file of an active database. Uncommitted transactions are not included. A busy source can restart capture, so progress may move backward.

Manage saved copies

Open ⋯ → Snapshots…. Select a copy to Open Read Only, Rename… or Delete…. Snapshots stay read-only in Petti. Deletion permanently removes the saved copy, not the source database.

Copies live under ~/Library/Application Support/Petti/Snapshots/ and are kept until you delete them. Each is a full database copy: a large source and two captures can need roughly three times the source size, plus working space. Local snapshots are not a substitute for a backup on another disk.

Compare two snapshots

  1. With at least two snapshots in history, choose Compare….
  2. Select the Before and After copies, then Compare.
  3. Select a table and a changed row to inspect its before/after values.

Insertions, updates and deletions are counted for supported tables. Schema differences and excluded tables are reported separately. A comparison is a report, not a restore or merge operation.

Use What Changed?

  1. Choose ⋯ → What Changed?, then Capture Baseline.
  2. Perform the action you want to investigate in the application that owns the database.
  3. Return to Petti and choose Compare with Current Database.

Each comparison saves a new current snapshot in history before comparing. Replace Baseline changes the starting point for future comparisons. Clear Baseline removes the selection, not the stored snapshot; replacing it also retains the old copy in history.

Read the limits, not just the totals

Comparison scans supported tables in full. Tables with unsupported or nullable keys, keyless tables, virtual tables and schema-changed tables can be excluded. Row totals cover compared tables only. Not compared does not mean unchanged.

There is a 60-second per-table comparison budget. In the release tests, the largest 100-million-row and 10-GB fixtures reached that budget and reported Not compared. Smaller fixtures completed. Large snapshots and diffs are explicit, cancellable operations; they do not run automatically when you open a database.