Trying to get back some lost files in my local collection

Hello,

After a bad manipulation from my part when I synchronized a new zotero account without having saved the files that were associated with the previous account I lost some part of my local library (even though I made a backup last June which makes the loss a little bit less damageable). I started to search for a program to recover deleted files and I found some zotero.sqlite and zotero.sqlite.bak files (being around 13 MB) that are from the end of last month and it seemed to me they could be the files I was searching for. I followed different advices and guide on how to proceed to recover a lost collection with other sqlite files or .bak (basically to put them in the place of the actual sqlite file in the Zotero folder) and it hasn't been sucessful, when launching Zotero I got this message making the new file I just put in place to be damaged :

"[Exception... "Could not convert JavaScript argument arg 0 [mozIStorageService.openDatabase]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: Zotero.DBConnection.prototype._handleCorruptionMarker :: line 1324" data: no]
Zotero.DBConnection.prototype._handleCorruptionMarker@chrome://zotero/content/xpcom/db.js:1324:24
From previous event:
ZoteroService@file:///C:/Program%20Files%20(x86)/Zotero/components/zotero-service.js:346:7
@chrome://zotero/content/include.js:4:14"

What I can add is when trying to rename the .bak files I have a message from windows saying that to modify the file extension could make it unusable, I made sure I made the hidden extensions to appear to,

If someone could help me,
Thanks a lot,
Flo.
  • Can you provide a Debug ID for Zotero startup through this error, using the "Restart with Logging Enabled…" option?

    Also, what are the names and sizes of all the files starting with 'zotero' at the root of your Zotero data directory
  • edited April 21, 2022
    Hey,

    "Can you provide a Debug ID for Zotero startup through this error, using the "Restart with Logging Enabled…" option?"

    For the Debug ID "through this error" I don't know if it's possible, the fact is that this error message is preventing me from opening Zotero.

    So normally I do have a file that is zotero.sqlite that is 1020 Ko which correspond to my empty library, I try do to the manipulation replacing it with the file I got with my program to recover lost files and it's a zotero.sqlite that is 13 588 Ko. After putting that file in the data directory I boot Zotero I do have the error message posted above "[Exception...etc" and Zotero is closing after I try to "Search for updates". Then I can boot anew Zotero but to an empty library with my data directory being composed of two files a new zotero.sqlite (1020 Ko) and the one I try to put in place that is damaged : zotero.sqlite.damaged (13 588 Ko).
  • For the Debug ID "through this error" I don't know if it's possible, the fact is that this error message is preventing me from opening Zotero.
    Did you try? Generally you should still be able to access the debug output window.
  • edited April 21, 2022
    13 what?

    (And I asked about all files in the folder.)
  • Sorry just edited my message I posted it by error 13 588 Ko.
  • edited April 21, 2022
    "13 what?

    (And I asked about all files in the folder.)"

    I do have the two zotero.sqlite files mentioned above with one being damaged plus four folders "locate, storage, styles, translators", that's it.

    For Debug ID I submitted the output here is the number D395008934. Or do you want me to save it as a text file ? It's like 300 hundred lines long so I can't post it here.

    (P.S. : Just asking wouldn't getting back my old account I deleted a possibility or not ?)
  • If you're referring to the dialog when you switch accounts, before making you confirm that you want to remove all local data, it tells you to either make sure you've backed up the local data directory or fully synced with the online library. If you did either, you'd have the library either in a backup or by switching back to the old account. If you did neither, it's not something we ever had on our servers, so there's no way we'd be able to restore it.

    I'm not sure what the debug output is meant to show — that doesn't appear to be for starting up with a damaged file.
  • edited April 21, 2022
    That phase with the switching account I already did it and being a dumbass I misunderstood the message and deleted my local library associated with my old account. I have a backup from June 2021 though I just wanted to try to recover the lost files since that date with an automatic backup.

    The phase I'm in is the "Restoring Your Zotero Data From a Backup" in the documentation but it doesn't turn out to give the same results as explained in this tutorial.

    Eeach time I try to put a sqlite file that seems to be like an automatic backup (a file I recovered with a program to get back lost or deleted files) in place of the new one I got an error message and I'm unable to boot Zotero. That's why it seems I can't do a debug ID too. With the files I recovered wouldn't I normally be able to do something ? I do have a zotero.sqlite (13 876 Ko), a zotero.sqlite.bak (13 584 Ko), a zotero.sqlite.1.bak (12 964 Ko) ; it's a little bit frustating cause it seems that these files could be the deal (with the recovering program indicating that there are dating from the end of last month).

    If it's not possible I will be satisfied with that manual bckup I did back in June, be more careful with my Zotero use and will be doing a lot more regularly backups though.
  • Eeach time I try to put a sqlite file that seems to be like an automatic backup (a file I recovered with a program to get back lost or deleted files) in place of the new one I got an error message and I'm unable to boot Zotero. That's why it seems I can't do a debug ID too.
    What do you mean by "I can't do a debug ID". I understand you're trying to restore from a backup and getting an error, but we can't debug it without the debug output, and the one you submitted seems to just be for a normal startup where you didn't get an error.

    Most likely, though, the database you restored is just corrupted — that's pretty normal when using undelete programs — and you're just hitting a secondary error as Zotero tries to deal with the corrupted file. You can try running the restored file through the DB Repair Tool (and you can post the Upload ID here if you want us to take a look), but there's a good chance this file just won't work.
  • For the debug ID : When I get the error I can either "Search for updates" or "Quit" either choice get the same result Zotero is closing down (for the first choice it's just searching for updates and then closing). To open Zotero anew (to go search for the debug ID) got me a normal startup with a new zotero.sqlite file popping into my Zotero data directory, the file I was trying to put in place switching as a zotero.sqlite.damaged file. So it doesn't seem like I can boot up Zotero with the damaged file and then go for the debug ID that would trace the problem.

    "Immediately perform the relevant action (syncing, saving, importing, etc.) and reproduce the problem you're experiencing."

    With what I said would I be able to reproduce the problem immediately ? With a normal startup automatically following a failed attempt ? But maybe that's just me missing the point, in this case : sorry.

    For the corrupted file : Thanks for the advice I'm going to try it.
  • Ah, sorry, rather than "Restart with Logging Enabled", follow these steps, which should open a separate window with the debug output. You should be able to either click or Alt-Tab to that window in order to submit the output, without needing to access the menus.
  • I tried with all my files for the DB Repair Tool and the message I got each time was "Uploaded file does not appear to be an SQLite database. Please upload a copy of zotero.sqlite.". So with all my files being corrupted I don't even know if that's worth going for a debug ID.

    Do you have a recommendation for a good program that could get me back some files that aren't corrupted or would there be a solution without the DB Repair Tool (I'm really a novice but I saw that there is some "manual instructions" that can be another solution) ?
  • I'm afraid your database is mostly likely just gone. Undelete utilities try to recover deleted files, but there's absolutely no guarantee that the file will be intact, and if you've used the computer since the file was deleted there's a very good chance it was overwritten with other data.
  • Ok no problem, thanks for your time and your help.

    Just a last thing : isn't it technically possible to undelete my old account that was associated with my local library ?
  • Nothing was deleted online. As I say above, you can switch back to your previous account at any time and pull down the data that's in it. But if you weren't fully in sync before switching accounts, any more recent local data wouldn't be there.

    You can just log into the account on this site and look at the web library to see what's there.
  • I can't switch back because I deleted my old account online and replaced it on the same mail with the account I'm with now, but my old account wasn't fully in sync so that wouldn't change anything I guess.

    Thanks for you help !
  • Ah, OK. Yes, if you just recently deleted the old account, we could restore it, but if it didn't have any newer data there wouldn't be much point.
  • Is this something that takes a lot of time or not ? I might have some datas that were on my online library that weren't on my local one (maybe like 20 books). But still if it's a big process I won't annoy you with that.
Sign In or Register to comment.