Lost Old Library

Hi,

I was trying to help a user backup her Zotero Library since she is getting rid of her PC. When we tried to export, nothing happened. After reading some Zotero articles, I suggested for her to sync with the Zotero server. She signed in with an old Zotero account that she used which had stuff from years ago, but apparently it replaced or overwrite all files and now she lost her recent library. Any suggestions? This really sucks and users should be warned before performing this option. A "merge" is not the same as a "replace." Any help please?

Thanks.
  • This is some sort of misunderstanding.

    There are only two possibilities here:

    1) She (or someone else with access to the library on a shared computer) had previously manually deleted all the items in the library, so when she synced those deletions were correctly applied to her local library.

    2) She had more than one Zotero account, and she switched to a different account from the one that she had previously synced with her current library.

    When you try to switch accounts, Zotero very clearly warns you that it will delete all local data, requires you to check a checkbox saying "Remove all data for “[current username]” from this computer", and says to make sure you've uploaded any data before continuing:

    "Before continuing, make sure all data and files you wish to keep have been synced with the “[current username]” account or you have a backup of your Zotero data directory."

    Only at that point does it delete the local library and switch to the other account.

    Assuming it was (2), she can log into that account and check its web library to see if there's data there. If she followed the instructions in the dialog, that library should have been fully in sync before she switched accounts, and she could just as easily switch back.

    For what it's worth, there are two ways to transfer Zotero data: using syncing and simply copying the Zotero data directory between computers. An export is not a backup and should not be used for this purpose.
  • Hi dstillman,

    Thank you for your reply.

    Reply to 1- This was her assigned work computer. Therefore, she didn't share it with anyone guaranteed, so I know that nobody went in and deleted it. Also, I saw the library before she signed in and then got replaced.

    Reply to 2- She was never signed in and I know this because I was remoted to her system the whole time watching her screen and she even had to reset her Zotero password because she forgot the old account that she used. Therefore, it never prompted to switch accounts or say that it was removing data, I swear.

    With my simple google search, we tried to export, but the export didn't work using RIS. When we opened it, it was empty. Even the CSV was empty as well. Then, the second suggestion was to sync with the cloud which is what we did, but it horribly erased her library. I currently have the system and it hasn't been touched ever since. I don't know how to proceed. Please advise!

    Thanks.

  • There's simply no way that syncing a library that has never been synced would delete all local data. That's just not how syncing works. Zotero only syncs explicit deletions made within Zotero. So if those items were created locally and never existed anywhere else, there's no way they were deleted anywhere else, and there's therefore no way for a sync to delete them.

    I know you don't remember seeing the account-switching prompt, but that's really by far the most likely explanation, and if she was struggling to remember her password for an old account, it seems entirely possible that she had more than one account.

    We might be able to say more if you tell us the username — you can post that here or email it to support@zotero.org with a link to this thread.
    With my simple google search, we tried to export
    I'm not sure what you're referring to, but for what it's worth, no instructions of ours say to do this to move data between computers. The page I linked to above says to either 1) transfer the data directory or 2) sync, and it explicitly says not to use export. (Exporting should certainly create an export, of course, but it's too late to debug that.)
    I currently have the system and it hasn't been touched ever since.
    Make sure you have a backup copy of the Zotero data directory before doing anything. (If Zotero is open, make a backup copy before closing it.) Then tell us the names, sizes, and dates of all files beginning with “zotero.sqlite” in the data directory and whether there's a 'storage' folder containing subfolders with dates corresponding to her previous usage of Zotero.
  • Does exporting the data delete the library?
  • No, of course not.
  • With the export not working, we then tried the sync and I can guarantee you that she had never signed on before (with any Zotero account) with that system. She didn't even know how to sign in in the first place... I had to show her.

    Her email that she used, I just sent it to support@zotero.org. I don't know if this is thread is private or not.
  • She synced yesterday with Zotero 5.0.51, which is a version from June 2018. There've been 43 releases since then. I don't recall what the account-switching dialog said back then, but we've definitely made it clearer and scarier in the years since. In general, we can't provide support for a 2.5-year-old version of Zotero.

    Once this is resolved, she should install the latest version of Zotero from the download page and try to figure out why she wasn't receiving automatic updates.

    You didn't provide the info I asked for above about the data directory, which may shed more light on this.
  • I just sent an email with screenshots of the Zotero folder and its contents. Please advise!
  • edited December 23, 2020
    Have you searched for other copies of zotero.sqlite on this computer?

    Did you move/remove a .bak file in this directory while trying to restore the data?

    What are the dates of files in 'styles' and 'translators'? From April and/or now, or times in between as well?

    The screenshots you sent show that the data directory and database were created in April, so it doesn't seem like this data directory was switched from another account, which wipes the directory completely. But it also shows only one backup file (zotero.sqlite.bak). Normally there should be two (zotero.sqlite.1.bak), so unless you removed one, or this computer is very low on disk space, that would suggest that this data directory was used once in April and then again for the first time yesterday.

    If you did move one of the .bak files, I don't know what to tell you — while we can't vouch for a 2.5-year-old version of Zotero, it worked the same way, syncing only explicit deletions, of which none exist in this library.

    Do you have a recent backup of this computer? If not, and you can't find another zotero.sqlite on the disk, I'm afraid there's nothing we can do here.
  • 1. I have searched the entire PC and have not been able to find anything from before 12/21 at 10:02 AM which is when she synced. I even installed recovery tools yesterday and unfortunately, it was not successful in recovering any previous data.
    2. I/we have not removed/deleted anything, we swear. The .bak in the screenshots submitted yesterday seems to have been created when we told Zotero that we no longer wanted to sync with the server just to try and see if it would go back to the local library (again, thinking/hoping we had not lost it).
    3. Submitted a screenshot of styles and translators via email.
    4. I am unsure as to when it was last used, the user states that she last used it in early-to-mid September. Again, I swear that nothing was removed/deleted and the system currently has 70 GB free.
    5. Nothing was moved.
    6. Unfortunately not.

    Please let me know with the information above if there is something else that can be done.
  • edited December 23, 2020
    I/we have not removed/deleted anything, we swear.
    It wasn't an accusation — my point was simply that, if you moved zotero.sqlite.1.bak to zotero.sqlite to try to restore from a backup, that would explain why one backup file was missing.
    The .bak in the screenshots submitted yesterday seems to have been created when we told Zotero that we no longer wanted to sync with the server
    No, it's just created on Zotero close if a backup hasn't been made in 24 hours. And normally there should be a second backup, zotero.sqlite.1.bak, that's 24 hours older than that, and possibly another with a higher number if this data directory had been in use.

    The fact that there are no other .bak files, and the one that exists has the same timestamp as the main file, strongly implies that this wasn't the data directory in active use.
    3. Submitted a screenshot of styles and translators via email.
    Can you send additional screenshots of the translators directory, showing the rest of the entries newer than 6/6/2018? (I don't need to see the rest of those.)

    Could you also upload the zotero.sqlite file to the DB Repair Tool and post the Upload ID here? Don't bother trying to restore from the file it gives you — this will just let us run some tests on the file.

    But that this point this is really just to try to piece together what happened, and to determine if this was indeed the database being used previously. If you can't find another zotero.sqlite file anywhere, it's somewhat moot in terms of actually getting the data back.
  • -Upload ID 5fe3b6771bc40.
    -I also emailed you screenshots of the translator directory, showing the rest of the entries newer than 6/6/2018.

    Thank you!
  • OK, so this just doesn't seem to be a data directory that was being used previously. The database does not appear to have ever contained any previous data. The 'translators' folder shows modified files from only one previous date in September (not counting the bundled files from 2018), which means that Zotero may have been opened once then but was not used on any other days. (Zotero translators are updated all the time, and an active installation would show a range of dates.) But it's also not a new data directory, as it would be from switching sync accounts — it seems to have been created in April (with a 2-year-old version of Zotero, for some reason). But there's no sign that data was ever created in it.

    You haven't said over what time period this installation of Zotero was being used, or how much data was in it, but if you're sure there was a Zotero library on this computer, the best I can suggest would be to again look elsewhere on the computer for another zotero.sqlite file. That's about all I can tell you.
  • The program was installed 6/20/2018. The current version on the system is: 5.0.51. It was never updated because our users do not have admin priv to be able to update and she never let me know that an update was needed. I cannot tell you because I am not the user, but I know that I saw the data there before the sync. The user even provided me some examples of citations that should have been in the library:

    User emailed me this:
    "Early to mid-September. I might have used it since but not as often. Citations I would have added at the time include:
    Roncoli et al. 2009
    Carr and Onzere, 2017
    Tschakert and Dietrich, 2010
    Karmalkar et al., 2013"

    Again, she only has data from 2018 and earlier, nothing last year or this year which she swears she worked on and had.

    I have searched the whole computer, and like I said even purchased recovery software, to try and find it unfortunately without any results. And there is no backup to this since it is outside of the main folders that do get backed up (Documents, Desktop, etc.).
  • If she used it this year and last year, it wasn’t with this data directory.

    The data from before 2018 was just data synced down from her online library the other day and isn’t relevant.

    If Zotero 4 was ever on this computer, you can check the data directory locations for Zotero Standalone and Zotero for Firefox, which may not show up in Windows search: https://www.zotero.org/support/zotero_data#default_locations

    There's nothing else I can suggest — sorry.
Sign In or Register to comment.