Calibre Zen Guide

How to Organise a Big Calibre Library Without Losing Metadata

Tidy a big calibre library on Linux by working inside calibre, not the file system: back up the folder, fix metadata in bulk, and partition it with virtual libraries.

The fastest way to lose metadata is to tidy a calibre library by hand. On a library of a few thousand books, the honest answer is counterintuitive: leave the files alone and change the metadata inside calibre instead.

calibre keeps your books in a folder it manages, with the metadata in a SQLite database beside them. Rename a file or move a folder in your file manager and calibre no longer sees it. Per the calibre manual, the library folder and all of its contents are managed by calibre. Every step below works with that, not against it.

What you need

sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin

1. Back up the folder before you change anything

The library folder holds your books and their metadata. At its top level sits metadata.db, the SQLite database with the title, author, rating and tags for every book. To back it up, copy the whole folder with every file and sub-folder inside it, per the manual.

To back up settings and plugins as well, back up the config folder. Find it at Preferences → Miscellaneous. Restoring a config folder is not officially supported, but the manual says it should work in most cases.

There is a built-in path too. Right-click the calibre icon on the toolbar and choose Export/import all calibre data, then Export all your calibre data. Disconnect any device first or the option is greyed out. It writes your books, settings and plugins to one folder, which you can copy to another machine and import.

2. Leave the files where calibre put them

calibre copies each book into sub-folders by author and title, and keeps the catalogue in metadata.db. Do not add, rename, move or delete files in the folder yourself: the manual warns that calibre may delete files it did not create. To attach an extra file to a book, use the top-right area of the Edit metadata dialog, or Add books → Add data files to selected book records.

The reason this matters is that search beats folders. The manual’s own example: a Genre → Author → Series → ReadStatus folder scheme makes it easy to find Asimov’s Foundation books, but there is no quick way to list every unread science fiction book without rearranging the whole tree. In calibre you tag the genre and the read status once, then search tag:scifi and not tag:read.

3. Fix metadata in bulk, not one book at a time

Select several books with Ctrl-click or Shift-click, then click Edit metadata. With more than one selected, calibre opens the Bulk metadata edit dialog. Set the author, publisher, rating, tags or series for all of them at once. It is built for a batch you just imported that shares values.

The dialog has a Search and replace tab that runs plain text or regular expressions and can copy one column into another. It applies after the other tabs, so use it on its own if you are unsure what the result will be.

Authors are their own entity. Right-click an author in the Tag browser and choose Manage authors to fix the name and its sort form, which updates that author on every one of their books. Separate multiple authors with &. The default sort assumes First name Last name and stores Last name, First name. Change that at Preferences → Advanced → Tweaks with the author_sort_copy_method setting.

To fill gaps from the internet, select the books, right-click Edit metadata and choose Download metadata. You can take metadata, covers, or both.

4. Split a large collection with virtual libraries and saved searches

A virtual library makes calibre show only part of the collection while every book stays in place. The manual calls it the way to partition a large collection into smaller, manageable chunks. Create them from the tutorial linked in the manual, in Search & sort → Virtual libraries.

Saved searches do the rest. Type a search in the search bar, give it a name in the Saved Searches box, and click the plus icon. You can then reuse it with one click from Saved searches in the Tag browser. The full-text button at the left of the search bar indexes the text inside your books, so a word search reaches past the metadata.

5. Add columns for what calibre does not track

calibre ships columns for the common fields, and you add the rest at Preferences → Interface → Add your own columns. In the add-column dialog, Quick create makes a column for the ISBN or the formats, and the template language builds “virtual columns” that combine other columns.

Custom columns and saved searches live inside the library folder, so the backup from step 1 covers them. That is another reason to copy the whole folder and not just the book files.

6. Move, merge and recover libraries

A calibre library is just the folder and everything in it, and you can keep more than one. Click the calibre icon on the toolbar to create, remove, rename or switch libraries. With two libraries set up, right-click a book and choose Copy to library to move or copy it across.

If the book list comes up blank, calibre has lost the path to the folder. Right-click the calibre icon, choose Switch/create library, and point it at the folder with the blue icon. If you do not know where the folder went, search the disk for metadata.db.

Moving to a new computer is the same export and import from step 1: it carries your books, settings and plugins in one go.

7. Read the same library in Calibre Zen

Calibre Zen is calibre with a new interface layer on top. It wraps calibre’s own binary, so your library, plugins and formats are still calibre’s. It opens an existing calibre library as it is, and both apps can open the same library, one at a time. Its welcome wizard can copy your calibre settings across once. The full comparison is in Calibre Zen vs calibre, and the newer tools around the format are in Calibre alternatives.

When it won’t help

Takeaways

Questions

Will tidying my calibre library folder break calibre?

Yes. calibre manages the folder and the metadata.db inside it. Rename or move files by hand and calibre loses those books. Change the metadata inside calibre instead.

Can I put my calibre library on a NAS or network drive?

No. The calibre manual says not to. Network filesystems often lack locking and hardlinking, and two copies of calibre on the same library corrupt it. Use the Content server, or sync with rsync or Dropbox while calibre is closed.

Does Calibre Zen change my calibre library?

No. Calibre Zen opens the same library folder as calibre. Both apps can read it, one at a time, and neither changes the other's settings.

Download Calibre Zen Calibre Zen docs