I recently had some trouble making a backup of my library, the full path names of some of the books in it were too long for Windows to handle gracefully. I used a save template to create a nice compact backup folder instead that was easier to package up.
I was thinking, would it be a reasonable feature request to be able to create a new library using the metadata in an OPF file as a template to create custom columns from? That would make it a heck of a lot easier to import that backup package back into Calibre in the event that it's needed someday - I'd just need to grab an OPF from a fully-metadata-populated book, create a new library from it, and then import everything without fear that I'd lose metadata in the process. It'd make it easier to distribute libraries with fancy custom columns to others, too. Those long file paths played all sorts of havoc with some of the archive-making programs I tried, it really wasn't fun trying to work with the source library directory directly.
Or is there already an existing system I can use for recreating custom columns in a new library? That library settings backup .json file I sometimes see, perhaps?
Edit: For anyone who digs this thread up on the same quest as me, I've now learned through harsh necessity that the .json file does indeed contain everything needed to reproduce the structure of a database. One of my libraries got corrupted and restore-from-backup was failing. So I made a brand new blank library, copied the .json file from the corrupt one into it, "restored" the new library's database (which recreated all my custom columns) and then used "add book" to import all the books from the corrupt library into it. All nice and tidy again. I love how robust Calibre's handling of metadata is.
Last edited by FaceDeer; 12-01-2012 at 10:02 PM.
Reason: added a bit of new info I've learned since posting
|