Backing up your library

Your measurement library is primary data. A record of a borrowed pedal — or of your own pedal before a repair changed it — cannot be retaken at any price. PedalScope keeps everything in one library on this Mac, and until you make a backup there is no second copy anywhere.

Settings → Library is where the library is backed up, checked, and restored. Nothing there requires the Measurement Unlock: your data is yours in every purchase state.

What a backup is

A backup is one folder containing the whole library:

  • the measurement store (every record, pedal, calibration, and summary source), copied through a consistent snapshot — safe even though the app is running;

  • the library’s data files — measurement data kept as files after the storage optimization below, record screenshots, and pedal portraits — which live in a hidden directory inside the backup;

  • a manifest recording what the backup holds: record, pedal, and group counts, and a SHA-256 integrity fingerprint of every stored measurement payload.

Treat the folder as a unit. Copy it, move it, or archive it whole — never pick files out of it. The data directory is invisible in Finder, so copying the visible files individually silently loses everything it holds — on an optimized library that is the measurement data itself — and nothing would tell you until you restored and found it gone. Verification walks every stored reference against the files, so a backup that lost its hidden directory is at least reported broken rather than discovered broken.

For the curious

The store is SQLite; the snapshot uses SQLite’s online-backup API, which reads a consistent image even mid-write, so a backup taken while the app is open is still valid. The manifest’s integrity fingerprint is a SHA-256 chain over every record’s payload, in storage order — the same construction the project’s own bench notes use, so a backup can be checked against them number for number.

Backing up

  1. Open Settings → Library.

  2. Choose a destination — an external drive or a synced folder is the point of the exercise; a backup on the same disk as the library does not survive the disk.

  3. Click Back Up Now. Progress is shown, the backup can be canceled (a canceled backup removes its partial folder rather than leaving something that looks like a backup), and the completion line quotes what was written: counts, data files, size, and the integrity fingerprint.

Verify a Backup… re-reads any backup folder and checks it against its own manifest — counts and the payload fingerprint. Verifying is read-only. A backup made by hand (a plain copy of the library folder) verifies too; it simply has no manifest, and the report says so rather than inventing a pass.

Restoring

Restoring replaces the current library with a backup’s contents. The design has one rule above all others: a restore that fails at any point leaves you with a working library.

  1. Click Restore from Backup… and choose the backup folder. The backup is verified first; a backup that fails its own manifest is refused before anything happens.

  2. Confirm. The backup is copied into a staging area and verified again. Your current library has not been touched.

  3. Quit PedalScope. The restore completes the next time the app opens — the only moment the app is not holding the library. Your previous library is parked (set aside inside the app’s own folder), never deleted, and the restored one is verified before the marker clears.

A restore interrupted anywhere — a crash, a power cut, a lost staging folder — either completes on the next launch or is refused with the original library still in place. There is no in-between state.

Optimizing storage

Measurements made by earlier versions of PedalScope live inside the database rows, so anything that lists records — the sidebar, launch — loads their data into memory too, and the app’s memory use grows with the library. Optimize Storage (in the same Library pane) moves those bytes out of the rows into the library’s hidden data directory. Nothing about the measurements changes; where they are kept does.

The mechanism is the restore machinery wearing different work clothes: the library is copied in full, the copy is verified against the original — counts, every stored value, every relationship, and the same SHA-256 payload fingerprint the backups quote, which must come out identical — and only then is the verified copy staged. The swap happens the next time PedalScope opens, and the library you have now is parked, never deleted, exactly like a restore. If a measurement is made between staging and that launch, the swap refuses itself and tells you to run the optimization again — nothing newer is ever set aside silently.

Running it needs transient free disk of roughly three times the library’s size, and the pane refuses with the numbers if the volume cannot afford it. Measurements made after the optimization (or after the app version that introduced it) are stored the new way from the start, so the action is one-time per library, not maintenance you repeat.

Previous libraries

After a restore, the parked previous library appears in the Library pane with its size. Nothing removes it automatically. When you are satisfied with the restore, Remove… deletes it permanently — that removal is the only step in the whole design that cannot be undone, and the confirmation says so.

An export bundle is not a backup. Exports are for sharing and archiving individual records; they do not capture the library, and a pile of bundles cannot be restored. Back up the library itself.