Very interesting, no idea why that is happening. I cannot replicate it:
Code:
[eschwartz@arch ~]$ mkdir /tmp/fake-library
[eschwartz@arch ~]$ cd /tmp/fake-library
[eschwartz@arch /tmp/fake-library]$ touch metadata.db
[eschwartz@arch /tmp/fake-library]$ chmod 600 metadata.db
[eschwartz@arch /tmp/fake-library]$ calibredb restore_database --with-library ./ --really-do-it
Starting restoring preferences and column metadata ... 0%
Cannot restore preferences. Backup file not found. ... 100%
Restoring database succeeded
old database saved as /tmp/aurvote-eschwartz/metadata_pre_restore.db
I have no idea why calibre doesn't see your library.