Skip to content

loupekind records rebuild

Description

Set this computer's records database aside and build a new one from the snapshots in your shoots' folders. It's the way back when the database is damaged.

LoupeKind checks the database when the studio starts, and loupekind doctor checks it whenever you run it. A database that fails the check is only read from then on, so nothing is written on top of the damage: the studio shows your shoots, and any change fails with a message pointing here.

Rebuilding:

  1. refuses while the studio is running, because the studio holds the database open;
  2. refuses a database that passes its integrity check, unless you pass --even-if-sound. The message lists the shoots that would lose work: those whose records changed since their last snapshot, those whose folder no longer holds that snapshot (it's gone, replaced, unreadable or another shoot's), and those no folder holds. If the database can't be read well enough to tell, it says so rather than that nothing would be lost;
  3. renames the old database to loupekind.db.damaged-<date>-<time>, beside where it was, with its -wal and -shm files. Nothing is deleted;
  4. finds your shoots in the old database, as far as it can still be read, and in the studio's list of shoots;
  5. opens each one, which takes its records from its snapshot, .loupekind/records.db.

It then lists each shoot under what happened to it:

Heading Meaning
Took the records in each one's snapshot The shoot is back as its snapshot left it
No snapshot, so these start with no records The folder had no snapshot. Its frames are fine, but its verdicts and edits are gone
Couldn't use the snapshot The snapshot couldn't be read, such as one a newer LoupeKind wrote, or belongs to another shoot. A warning says why, and the file is left as it is
Not found where this computer last saw them The folder has moved or its drive isn't connected. Open it from wherever it is now and it takes its snapshot then
Couldn't open A warning above says why

A snapshot is written after a cull, after an export and, for each shoot the studio opened, when it closes, not on every verdict. Verdicts set since a shoot's last snapshot aren't in it, so they don't come back.

rebuild isn't offered to an AI agent over MCP.

Usage

loupekind records rebuild [flags]

Flags

Flag Type Default Description
--even-if-sound bool false Rebuild even though the database passes its integrity check, losing what changed since each shoot's snapshot

Examples

loupekind doctor
loupekind records rebuild

# Start again from the snapshots on a database that isn't damaged
loupekind records rebuild --even-if-sound

See also