DecksMD 2.9.1
Released 7 August 2026
Decks 2.9.1 — saving the database can no longer damage it
This release fixes a way the flashcard database could be destroyed while being saved. If you have ever seen "database disk image is malformed", this is the cause.
What was wrong
The database was rewritten in place on every save — around 11 MB for a mature collection. If that write was interrupted partway through, the file was left truncated and there was no intact copy to fall back to: the previous database had already been overwritten. SQLite reports the result as a malformed disk image and refuses to open it, which means decks, cards and the entire review history become unreadable.
A write can be cut short by quitting during a save, by the machine sleeping, or — most often — by a sync client such as iCloud or Dropbox swapping the file while it is being written.
What changed
Saves now write to a temporary file first and only replace the database once that file is complete. An interrupted save leaves the previous database exactly as it was, so the worst case is losing the most recent save rather than everything.
- A save that comes up short is refused outright, with the existing database left untouched.
- If the app is interrupted at the precise moment of replacement, the save is completed on the next launch.
- Backups are written the same way. A half-written backup is worse than no backup, because it looks like a restore point until the day you need it.
If your database is already damaged
Existing corruption cannot be repaired by this update, but Decks keeps automatic backups. Look in the .decks-backups folder inside your vault, pick the newest file, and copy it over flashcards.db in the Decks plugin folder with Obsidian closed. Card content is rebuilt from your notes on the next scan, so what a backup restores is your scheduling and review history.
Recommended if you sync your vault
If your vault lives in iCloud, Dropbox or similar, mark it Keep Downloaded (or the equivalent "always keep on this device" setting). That stops the sync client evicting or replacing files while they are in use.
Also on GitHub.