Help with restoring Zotero library from backup

Hello,

I am trying to restore my Zotero library from a back-up. To do so I have copied my old Zotero folder into the new data directory on a my new laptop but Zotero says that the database cannot be opened. The sqlite file from my backup is 28GB big so there definitely data stored in the file. However, my backup sqlite files all have dates within their names (e.g. zotero(2021_04_27 13_12_20 UTC).sqlite) so I was wondering if that was maybe the problem and how to solve this issue?

Thanks for any help!
  • Zotero says that the database cannot be opened.
    What exactly is it saying?
    However, my backup sqlite files all have dates within their names (e.g. zotero(2021_04_27 13_12_20 UTC).sqlite)
    Those aren't filenames created by Zotero. Zotero simply reads the file named zotero.sqlite in the data directory.
  • edited May 17, 2021
    The sqlite file from my backup is 28GB big
    Just to clarify, do you really mean that? Or do you mean that it's 28 MB? Or maybe (just maybe) that the entire data directory is 28 GB?

    28 GB would be astronomically large database file. There's almost no way for a valid database to be that size.
  • Do you know what might have created these dated sqlite files? as I can't seem to find any without dates in them.

    And yes (apologies), the data directory is 28GB while the sqlite file is 92MB.
  • Your backup system, presumably. Nothing to do with Zotero itself. The point is just that, if you want to restore from a backup, you need to move the file so that it's named zotero.sqlite in the data directory when Zotero starts up.
  • Thanks dstillman - that makes sense. So, I tried renaming the most recent sqlite file to zotero.sqlite and moving it to the data directory and that's when I get the following message:

    'The Zotero database cannot be opened.

    Make sure you have read and write permissions for all files in the Zotero data directory and that security software isn’t preventing Zotero from accessing that directory.'

    I have checked both of these and they are not a problem - any ideas?
  • edited May 17, 2021
    It's what it says. There's something wrong with the permissions on the folder itself or the files within — they need to be readable and writable by your user account. Pretty common for that not to be the case when restoring from a backup.
Sign In or Register to comment.