Skip to content

loupekind records restore

Description

Replace this computer's records for a shoot with the snapshot in its folder, .loupekind/records.db. Use it when the shoot was worked on another computer and LoupeKind says the folder holds work this computer hasn't seen. That can be true even when this computer changed the shoot more recently, and restoring replaces that work too.

Restoring replaces every verdict, rating, edit, review and export record this computer holds for the shoot. Work done here since the snapshot was written is lost, so check the notice before you run it. Originals are never touched.

Restore refuses two snapshots:

  • One written for another shoot, such as a records.db copied in from another folder. There's no way past this.
  • One older than this computer's records, when they hold changes the snapshot doesn't. The message says when each side last changed. Run again with --older to restore it anyway, losing those changes. A snapshot that LoupeKind offered when the shoot opened is taken as long as you haven't changed a verdict, rating, edit or the shoot's look on this computer since. What LoupeKind writes for itself, such as a cull's analysis, an AI review or the export ledger, doesn't count. Once you have, it needs --older too. One holding the same records as this computer is always taken, as restoring it changes nothing.

The folder isn't written to, as it already holds these records. Its snapshot is next written when they change.

restore isn't offered to an AI agent over MCP, because it replaces work without asking.

Usage

loupekind records restore [flags]

Flags

Flag Type Default Description
--shoot string current directory The shoot directory
--older bool false Restore even when the snapshot is older than this computer's records, losing what changed since

Examples

loupekind records restore --shoot ~/Pictures/smith-wedding

# Go back to the folder's snapshot, discarding what changed here since
loupekind records restore --shoot ~/Pictures/smith-wedding --older

Errors

Message Cause
this shoot's folder has no snapshot No .loupekind/records.db in the folder
this file isn't a shoot's snapshot records.db is a database, but not a snapshot LoupeKind wrote
this shoot's folder holds another shoot's snapshot The snapshot's shoot ID isn't this shoot's
this computer's records for the shoot are newer than its folder's snapshot Changes made here since the snapshot would be lost. Use --older to restore anyway
this shoot's snapshot changed while it was read Another device saved into the folder during the restore. Try again once it has finished
this shoot changed on this computer after its folder's snapshot was offered You changed a verdict, rating, edit or the shoot's look here after LoupeKind offered the folder's snapshot. Use --older to restore anyway
this shoot's records changed while its snapshot was being taken Something saved to the shoot during the restore, such as the studio. Run it again

A damaged or unreadable file fails with the reason SQLite gives.

See also