I have no idea when it happened, or how, but somehow I have a large number of books (in an even larger library) which have been added to the Library (in the directory), have been assigned a Library number, and yet are not in the database.
Initially I thought that the Library maintenance option would fix the problem, but it seems only to want to delete items, not fix the Database problems.
The library on disk is correct and contains books in the correct Calibre format: i.e. the book, the metadata.opf file, and the cover file.
Each book that I have examined seem to have been added properly and have valid, but unused, Calibre database id. The Database itself is valid, but incomplete.
Is there an automatic solution?