Changing group library to no group storage removed local storage

I recently changed one of my groups to remove the group storage (i.e., sync to online). As I was the only group member, I'm the only one who would've added any of the attachments to any item, and I only work on one machine, so they were all on my machine.
I've now realised I've just lost all of the attachments stored (including many annotated PDFs). I did not think that was was the change would do (I thought I'd done this before and it didn't have this behaviour), and I can't see if there's any way to recover/reinstate those items now?
  • If you turn off group file storage, you delete all the files, yes. This is the warning it shows:
    Choosing the selected settings requires deleting any stored attachment files for this library.

    This library has [x] total attachments.

    [x] attachments will be deleted.
    And then you have to click Delete Attachments to proceed. This has always been the case.

    The only way to restore those would be if you have a local backup of your Zotero data directory (including another synced machine that hasn't yet synced these deletions).
  • Ok thanks. I know that message comes up, but I didn't realise that meant both online and local, and my case (I just wanted to preserve online storage, while retaining my local copies) seems likely to be true for others too.

    It looks like the files are actually in my local trash, I did try to click to 'restore' but that doesn't seem to be doing anything.
  • What's the first letter of the group name?

    It actually might be possible to restore from one of your automatic backups as well. That would only restore the attachment items, not the files, but we may be able to reassociate the files online.

    You should 1) make an immediate backup of all zotero.sqlite* files in your Zotero data directory and 2) change the group back to allowing file editing.
  • first letter is l
    What's the difference between attachment items and files?
    I think if I were to restore from a backup, I'll end up losing anything I've done since (e.g., today) right?
    I've just changed the group back to allow file editing in any case.
  • Make sure you’ve made the backups as well.

    Have you made other changes to that group today, or just other libraries?
  • I've copied anything with ztero.sqlite* to somewhere else.
    I haven't made any changes to that group today, just other libraries. I don't remember what day I made the change, maybe Tuesday 4th, and I think I've made one edit to the library since then (5th), I've just saved an RDF of that edit (it was one collection).
  • edited June 7, 2024
    OK, disable auto-sync, close Zotero, and then try swapping in a copy of zotero.sqlite.bak as zotero.sqlite in the data directory. If that starts up and you don't see the data, try the same with zotero.sqlite.1.bak, which would be older.

    If you find your data, you can do Replace Online Library for just that library from the Sync → Reset pane of the settings.

    (This process is covered in the linked section above.)
  • No luck sadly, as before I can see items in the trash with PDFs (although they don't show in the 'attachments' column) but I can't 'restore to library' on them, and the attachments are gone from all items in the library. I think I exported all the annotations to notes so at least I have that, but I had added some custom data attachments and various items where the pdf itself was quite hard to find/required disaggregation of something.

    Is there some correct process for doing what I wanted to do here? (remove online attachment storage, retain local copies) or is it just not possible?

  • edited June 7, 2024
    It looks like you deleted many items in this library on May 29/30, so if that was these items, those would be out of the automatic backup window.

    I'm not totally clear on what you're seeing in the trash, though. Are you saying you see all the attachments that were deleted?

    Can you provide a Debug ID for selecting one of the items and clicking Restore to Library?
  • Also, though, if the backup doesn't have what you need, you can switch back to your original zotero.sqlite and then sync. That might actually let you restore the attachment items from the trash.
  • To be clear, this process deletes attachment items permanently — it doesn't move them to the trash. So I'm a bit confused how you would have any copies of them anywhere, and particularly copies without files, unless you already tried some other restore step, or you made changes locally before the remote deletions were applied and there was some sync conflict.

    You do have 88 attachments in this library taking up 150 MB of space, though. These are all old attachments that were updated about an hour ago. So I guess I'm a bit confused about the current state of your library and what you've done since turning off group file storage.
  • Thanks Dan (apologies for the delay, it was a long weekend here).
    Debug ID for trying to restore one of the items is D1493776249

    "you made changes locally before the remote deletions were applied and there was some sync conflict." - that's possible I guess.

    Since turning off group file storage, I was mostly just working as usual (on other libraries). When I realised the issue, I turned off automatic sync (still turned off), turned group storage back on, tried the other sqlite (and then reverted back to my most recent one), and tried to 'restore' items from trash.
  • OK, if you have your items locally — in the trash or otherwise — you should do Replace Online Library for that library (and only that library).
Sign In or Register to comment.