restore database without metadata.db present in directory fails

Bug #1519855 reported by m.hataj on 2015-11-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

calibredb restore_database --library-path=/mnt/3TB/Bibliothek/eBook-Transfer --really-do-it

takes 2 days to look in each folder and fails with

Buntes Allerlei Nr. 5 ... 99%
Buntes Allerlei Nr. 6 ... 100%
Restoring database failed with error:

       Traceback (most recent call last):
       File "/usr/lib/calibre/calibre/db/restore.py", line 125, in run
         self.replace_db()
   File "/usr/lib/calibre/calibre/db/restore.py", line 272, in
         replace_db
     os.rename(dbpath, save_path)
       OSError: [Errno 2] Datei oder Verzeichnis nicht gefunden

a simple

      touch /mnt/3TB/Bibliothek/eBook-Transfer/metadata.db

solves this issue.

As I'm still repairing my huge, crashed library and moving folders by hand to reindex, this would be useful to just create metadata.db if there is no, as this is the goal of the game.
Currently the crash after a restore-run that took days is annoying.

m.hataj (m-hataj) on 2015-11-25
description: updated

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers