@barsanuphe: Argh.

.
cf.
https://github.com/NiLuJe/librarian for my somewhat cleaned up changes before the refactor.
And, yep, the export should overwrite system/collections.json

.
EDIT: As for the cdeKey stuff, the idea is to parse the legacy hash found in the json db to get the proper cdeKey, and then match that cdeKey to the book's uuid in the db, since this is this id that needs to go in a collection, not the cdeKey or the legacy hash.