delete the metadata.db file (back it up first). Then start calibre, calibre will create an empty metadata.db, then follow the instructions here:
http://manual.calibre-ebook.com/faq....n-app-is-blank
Alternately, pass the --with-library option to calibredb restore_database since that erro ris coming from an inability to read the stored database path in a corrupted config file.