-
-
Notifications
You must be signed in to change notification settings - Fork 5
Reconcile
rhoopr edited this page May 18, 2026
·
4 revisions
Detect assets the state DB thinks are downloaded but are missing from disk, and mark them for re-download on the next sync.
# Preview what would change (safe, no writes)
kei reconcile --dry-run
# Apply: flip every missing file's row to status=failed
kei reconcileFor each asset with status = 'downloaded' in the state DB, check whether the recorded local_path still exists on disk. If the file is gone, mark the row as failed. The next kei sync retries it through the normal failed-asset path and re-downloads the file.
- After manually moving, renaming, or deleting photos from the download directory.
- After restoring from a partial backup where not every file came back.
- After an external tool reorganized the tree (dedupers, migration scripts).
- When
kei statusreports fewer files on disk than the DB expects.
- Never deletes files. Reconcile only reads from disk.
-
Never deletes DB rows. Missing assets are flipped from
downloadedtofailed, not purged. The row keeps its metadata, checksum, and history. -
--dry-runis a read-only preview. Reports the count of would-flip assets; writes nothing.
| Flag | Description |
|---|---|
--dry-run |
Preview the count without updating the state DB |
Common runtime flags such as --config, --log-level, --friendly, and --no-friendly apply to this command.
Watch-mode users can run reconcile on a schedule with [watch].reconcile_every_n_cycles instead of invoking the command by hand. Off by default. Pair it with [watch].interval for things like hourly sync plus daily reconcile.
- State Tracking
kei status-
kei verify- cross-check SHA256 checksums (stricter, slower) - Watch Mode - periodic reconcile in watch mode