group library corrupted/missing?

Report ID: 1268715287

Today I started up the zotero standalone client and it took a very long time to open (several minutes, I think). I then discovered that a group library that I own was essentially empty -- it previously had probably >1000 citations and linked files, today it has just 8 entries, all from 2014. I logged onto my account on the Zotero site, and the group library shows only the same 8 entries. This group has ~20 members but I'm the most active user. My personal library and another group library I'm a member of seem ok.

The only recent event that I can think of that is out of the ordinary is that yesterday I did a hard reboot of my laptop (a Macbook Pro) because it had frozen. I don't know if that is at all related.

Looking in my laptop's zotero data directory, I can see:

zotero.sqlite Mar 31, 59 MB
zotero.sqlite.bak Mar 30, 63 MB
zotero.sqlite.1.bak Mar 29, 108 MB

I can only assume that between the Mar 29 and Mar 30 backups, something catastrophic happened that deleted all data in the group library. It seems suspicious that this coincided with a Zotero update (the pre-update backup is dated Mar 29 and the next day's backup is 45 MB smaller). The group's RSS feed is also dead: my RSS reader now reports "feed not found" and if I directly try to open the feed URL I get a "Forbidden" message.

Reviewing the docs, it seems that I may be able to roll back zotero standalone to a previous version, disable auto sync, copy the Mar 29 backup over zotero.sqlite, duplicate all items in the damaged library, and sync. Should I also try to locate a backup of the 'storage' directory? (all attached files from the missing citations seem to be gone from my current 'storage' directory)

Is this my best course of action? Is there anything more I could do to find out what happened? What could happen on a client that could cause (almost) everything in a library to be deleted?
  • We'll take a look, but first things first, you should obviously make a backup of your entire Zotero data directory.
  • dstillman Zotero Team
    edited March 31, 2015
    The items were deleted yesterday by someone who was previously in your group. I would guess the person was trying to leave the group — which they did, successfully, a few minutes later — and unwittingly deleted all the items and collections as part of that. If you email support@zotero.org with a link to this thread I can give you the person's username.

    To get your items back, make sure you have a backup of everything, and then install the 4.0 Beta of Zotero for Firefox, which should share your existing data directory by default. (This will become relevant later.) Disable auto-sync, close Zotero, replace zotero.sqlite with zotero.sqlite.1.bak (assuming it's still 108 MB), restart Zotero, and then go to that group and see if you see all the items. Unfortunately you won't have any of the attached files unless you also have a proper backup of your entire Zotero data directory. If you have that, you can swap in the zotero.sqlite and 'storage' folder from the backup instead.

    In any case, once the items are back, duplicating them isn't ideal, since you'd lose child items, so your best bet is probably to use Restore to Zotero Server from the Sync -> Reset pane of the Zotero prefs. That won't actually overwrite the group contents on its own with the local state — just your personal library — but it will reset your local last-sync time, which will trigger a conflict with all group objects that differ from the server (e.g., deleted vs. not deleted). Tags and collections should be restored automatically, but the items should all produce conflicts, with the local version "modified" and the remote version deleted. With the 4.0 Beta, you can can choose the first local item and then tell it to use the local version for all conflicts. (You'll also get conflicts for any items in your other library that were modified both locally and remotely since your last sync, and this would overwrite those.)

    See how that goes, and let me know if you run into trouble.

    This does appear to have been user error, but we'll try to think of some ways to address this better in the future.
    The group's RSS feed is also dead: my RSS reader now reports "feed not found" and if I directly try to open the feed URL I get a "Forbidden" message.
    That's likely unrelated. Let's resolve the other issue, and then we can take a look at this.
  • Thanks, I'll see what I can do with backups. Generally, I would think that the "delete" operation could be more tightly restricted in group libraries: either it should only be available to the group owner, or ordinary members should only be able to delete items they've created.
  • I was able to restore the library from a backup that was just a few days old. The process took a few tries -- I had to repeat the "restore to server" operation several times, the first couple times failed with errors that I think were all related to the fact that my account is linked to a second group library with read-only access.
  • dstillman Zotero Team
    OK, great.

    And yes, ability to restrict deletes (and maybe edits) to people's own items has been requested before. It's not really possible at the moment, but it could happen after the syncing overhaul in the next major version of Zotero.

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.