Backup & troubleshooting

Lexicon keeps structured data in one SQLite file and optional attachment files beside it. Copy both for a complete backup — or let the server do it for you.

Data location

WhatWhere
Database filelexicon.db
Blob attachmentsblobs/ next to lexicon.db, organized by SHA-256 hash
LocationThe same directory as the Lexicon executable
FormatStandard SQLite 3 — readable with any SQLite tool
ℹ️

Portable by design Move lexicon.db and the adjacent blobs directory together, placing them next to the executable on the other machine.

Backup strategies

The SQLite database and Blob directory together form the complete Lexicon data set. Backing up only the database is not sufficient when Blob Fields are used. Prefer a backup while Lexicon is closed or a coordinated snapshot while data is not changing.

  1. Close Lexicon. This guarantees the database is not mid-write.
  2. Copy lexicon.db and blobs/ to safe storage — external drive, NAS, or a synced folder.
  3. Version your backups — keep dated snapshots (daily or weekly) instead of overwriting a single copy:
    mkdir -p ~/backups/lexicon-$(date +%F)
    cp lexicon.db ~/backups/lexicon-$(date +%F)/
    cp -a blobs ~/backups/lexicon-$(date +%F)/
💡

Automate it A scheduled copy of the database and blob directory protects both metadata and attachments. If your lexicon is mission-critical, back up more often.

Automatic backups on the server

If you run LexiconServer, it can do the whole job for you. Automatic backups are disabled by default; give it a directory to opt in:

LexiconServer --database ~/lexicon/lexicon.db --backup-dir ~/lexicon-backups

Export and import

A backup of the raw files is the safest copy; an export is the portable one:

Deletion safety rules

Blob files are deduplicated by SHA-256: multiple Item values can refer to the same physical file. Removing a value, Item, Field, or Type leaves the file in place. Use Tools → Blob maintenance…, or run LexiconServer blobs scan --database /path/lexicon.db on a server, to scan for unused files. blobs verify also hashes every file; blobs collect verifies first and removes only canonical files which are still unreferenced after a final database and content check. Back up first and preferably stop writes while collecting. Missing means a referenced file is absent; Hash mismatch means its contents are corrupt. Restore these from backup rather than deleting them. Unexpected files and symlinks are reported but not collected. The commands are local and are not available through REST or the web UI.

Lexicon uses cascade deletion for dependent records, with an application-level guard around groups. Know these rules before you delete anything:

⚠️

Deleting an item also removes its aliases, tags, flags, properties, custom field values, cards, and all links/backlinks pointing to or from it.

Trash keeps a snapshot so you can restore a deleted item with its cards and surviving links. Previous saved item versions are available through History. A full database backup preserves both; a portable export contains current data only.

⚠️

Deleting a group is allowed only when it contains no items and no group-specific types. Move or delete those records first.

Changing a used field's data type explicitly warns that its values will be permanently deleted; deleting a field or type also asks first. Lexicon snapshots each affected item in History before deleting values or type assignments. The snapshot preserves the old IDs and raw values, but automatic restoration requires compatible type and field definitions. Keep complete backups of lexicon.db and blobs/ as the final recovery layer.

Troubleshooting

The app does not start

Database errors on startup

The build fails

Still stuck?

Open an issue on GitHub with your OS, Qt version, and the exact error message.