After restoring an export, I can't keep parts of it

Hello everyone.

Today I messed up and needed to restore a collection from an export I fortunately had done earlier. I imported my export which is my entire library. Then I moved the collection I had destroyed to my root (I had selected to create new collections on import). Then I deleted the imported collection(s) with "delete collection and items". Afterwards, my moved collection was empty but everything else was fine. How is that? I thought when I delete something with "delete collection and items", only items that are not used anywhere else are deleted. How are items in a collection that is on a higher level in the library deleted, too? I don't want to waste space by keeping my entire library twice (except for the one folder I destroyed which of course exists only once).

I would like some advice, I must have misunderstood something here. Thanks :)
  • Yes, you're misunderstanding this. Nothing is duplicated — items just can exist in multiple collections, and if you choose Delete Collection and Items, you're moving those items to the trash, which will cause them to be removed from all collections in your library. See The Zotero Collections Model for more info.

    If you restore those items from the trash, they'll be placed back in any remaining collections they were in.

    Note, though, that an export isn't a backup, and you'll have broken links to any existing citations in word processor documents by using that. A proper backup would be a copy of your Zotero data directory. If the original problem is something you just did, you may be able to restore from the automatic backups Zotero makes in that folder.
  • So, while I understand what you say and what is stated in the documentation, I don't understand one thing that I also observed today. As mentioned, I imported my entire library, creating a new collection "My library" with several sub-collections. I later deleted that new collection "My library" and all its sub-collections except for the one sub-collection that I had moved out to the root. But only the items that were in the collection that I moved were deleted. Items in other collections still exist, even though they were also in the imported collection and I deleted that collection and its items.

    If Zotero does not care in which collection an item was first added and just deletes it from all the collections if it is deleted together with one collection it is in, how is that possible? If it does not keep items in other collections, all my items should have been gone. If it does keep items in other collections, none of my items should have been gone.

    Also, do I understand correctly that there is no way to delete a collection and all the items that are only in this collection without also deleting all the items that are in other collections, too?

    Thanks for the hint to automatic backups. I did not know about those.
  • edited June 6, 2023
    I'm not really following, but if you still had some items in your library and then imported a full copy of the library, then you would've had some actual duplicates, and you might not have deleted those. But I promise you it works the way it's documented. You either move an item to the trash or you don't. What collections the item is in is irrelevant.
Sign In or Register to comment.