Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-22-2023, 01:42 PM   #1
iondream
Junior Member
iondream began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2023
Device: nexus 7
Database Restore not working

Hello all,
in the newest version 7.0 I can't seem to restore any database from backup.
I get this error.

calibre, version 7.0.0
ERROR: Failed: Restoring database failed, click "Show details" to see details

Traceback (most recent call last):
File "calibre\db\restore.py", line 157, in run
File "calibre\db\restore.py", line 296, in restore_books
File "shutil.py", line 561, in copytree
File "shutil.py", line 459, in _copytree
File "os.py", line 225, in makedirs
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\iondream\\vv02dv4s_rlib\\.calnotes'

Has anyone else seen this?

worth noting is that when I run from the latest source from github instead it all works fine. I could not find an issue for this however, so I wanted to make sure it was known.
Thanks,
iondream
iondream is offline   Reply With Quote
Old 11-22-2023, 02:35 PM   #2
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,040
Karma: 88064427
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Open Import etc. Before last step open the Calibre library destination in a File manager/ Explore/finder and make sure hidden files are shown.
Delete everything.
Now click on Calibre GUI.
The restore folder must be empty, but it has .calnotes in it.
Note: You don't say which OS, but maybe Windows? Mac & Linux by default don't show any file or folder starting with a period/dot, .<anyname>
Quoth is offline   Reply With Quote
Advert
Old 11-22-2023, 04:15 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,781
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by iondream View Post
Hello all,
in the newest version 7.0 I can't seem to restore any database from backup.
I get this error.

Spoiler:
calibre, version 7.0.0
ERROR: Failed: Restoring database failed, click "Show details" to see details

Traceback (most recent call last):
File "calibre\db\restore.py", line 157, in run
File "calibre\db\restore.py", line 296, in restore_books
File "shutil.py", line 561, in copytree
File "shutil.py", line 459, in _copytree
File "os.py", line 225, in makedirs
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\iondream\\vv02dv4s_rlib\\.calnotes'

Has anyone else seen this?
I've seen it now that I've run Restore on my Test library.

Code:
calibre, version 7.0.0
ERROR: Failed: Restoring database failed, click "Show details" to see details

Traceback (most recent call last):
  File "calibre\db\restore.py", line 157, in run
  File "calibre\db\restore.py", line 296, in restore_books
  File "shutil.py", line 561, in copytree
  File "shutil.py", line 459, in _copytree
  File "os.py", line 225, in makedirs
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'D:\\Calibre\\Libraries\\fwatryp3_rlib\\.calnotes'
No apparent ill-effects - library is back to what it was, including the content of the .calnotes folder.

BR

Last edited by BetterRed; 11-22-2023 at 04:19 PM.
BetterRed is offline   Reply With Quote
Old 11-22-2023, 05:10 PM   #4
iondream
Junior Member
iondream began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2023
Device: nexus 7
Quote:
Originally Posted by Quoth View Post
Open Import etc. Before last step open the Calibre library destination in a File manager/ Explore/finder and make sure hidden files are shown.
Delete everything.
Now click on Calibre GUI.
The restore folder must be empty, but it has .calnotes in it.
Note: You don't say which OS, but maybe Windows? Mac & Linux by default don't show any file or folder starting with a period/dot, .<anyname>
I've checked the folder, and there is no such directory
C:\Users\iondream\vv02dv4s_rlib\.calnotes
I assume this is dynamically generated. There is a .calnotes file, but moving it out of the dir has no effect.
iondream is offline   Reply With Quote
Old 11-22-2023, 05:13 PM   #5
iondream
Junior Member
iondream began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2023
Device: nexus 7
Quote:
Originally Posted by BetterRed View Post
I've seen it now that I've run Restore on my Test library.

Code:
calibre, version 7.0.0
ERROR: Failed: Restoring database failed, click "Show details" to see details

Traceback (most recent call last):
  File "calibre\db\restore.py", line 157, in run
  File "calibre\db\restore.py", line 296, in restore_books
  File "shutil.py", line 561, in copytree
  File "shutil.py", line 459, in _copytree
  File "os.py", line 225, in makedirs
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'D:\\Calibre\\Libraries\\fwatryp3_rlib\\.calnotes'
No apparent ill-effects - library is back to what it was, including the content of the .calnotes folder.

BR
Oh excellent. Earlier I was trying to recover a database that got corrupted, and I tried this to restore it from backup, but it didn't seem to work. (I ended up building a new library and importing everything again)
does anyone know how the database backup and restore process works? is there a copy of it kept somewhere automatically?

Thanks,
iondream
iondream is offline   Reply With Quote
Advert
Old 11-22-2023, 05:25 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,781
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by iondream View Post
does anyone know how the database backup and restore process works? is there a copy of it kept somewhere automatically?
The database is rebuilt from scratch using the metadata.opf files in the book folders, along with the metadata_db_prefs_backup.json at the top of the library tree.

BR
BetterRed is offline   Reply With Quote
Old 11-22-2023, 09:19 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,166
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's a bug fixed in the next release.
kovidgoyal is offline   Reply With Quote
Old 11-23-2023, 04:54 AM   #8
Mycroft88
Junior Member
Mycroft88 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2023
Device: Kindle Oasis
I also have the same problem. Looking forward to the update.
Mycroft88 is offline   Reply With Quote
Old 11-23-2023, 11:45 PM   #9
Mycroft88
Junior Member
Mycroft88 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2023
Device: Kindle Oasis
The new update, 7.1 fixed the problem. Yay kovidgoyal!!! ��
Mycroft88 is offline   Reply With Quote
Old 11-24-2023, 12:08 AM   #10
iondream
Junior Member
iondream began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2023
Device: nexus 7
Quote:
Originally Posted by kovidgoyal View Post
It's a bug fixed in the next release.
My thanks as well!
iondream is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
restore database franklekens Kobo Reader 32 06-02-2024 06:28 PM
Aura Restore the database Ksquared Kobo Reader 2 09-17-2016 08:04 AM
Restore Database? BookJunkieLI Library Management 6 08-15-2014 06:10 PM
Restore Database? BeeTee-Ess Calibre 2 10-12-2012 07:40 AM
restore database help mabee Calibre 13 01-11-2011 02:16 PM


All times are GMT -4. The time now is 09:45 PM.


MobileRead.com is a privately owned, operated and funded community.