Accidentally lost all library
I'm at the last stage of writing PhD dissertation and the whole collection is gone after reinstalling standalone and Firefox. I don't see it on my Zotero account either. I must have done something wrong and the whole bibliography is gone! Is there any way to retrieve it? Pray for me! :(
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.
I assume you emptied the Zotero trash when you deleted the items?
I searched and I found "zotero.sqlite.bak" older than "zotero.sqlite" could this be a miracle?
You should be able to rename the file to "zotero.sqlite" (with Firefox and Zotero Standalone closed) and open Zotero Standalone. Make sure Zotero Standalone is looking in the right folder (see point 2 at the link Dan gave you above).
Is it possible to delete the empty standalone library and reinstall? I read somewhere that that might help but have been reluctant in case it damages my online Zotero library - any suggestions would be gratefully appreciated.
Thank you
Which advice, specifically, have you followed so far?
Generally, this is the place to start: http://www.zotero.org/support/zotero_data#where_did_my_items_go
I have now installed zotero standalone again and then logged in to my online account and I am unable to revocer my files. Of course, they are really important - as to everyone... any chance this can be recovered? :(
And you don't have a back-up copy of your old harddisk contents?
Note that if you took a back-up of your entire harddisk (as would be fairly standard before a system reset) your Zotero database would be included in that.
I have Zotero stand alone and Zotero for firefox installed on my computer (latest versions).
I have steadily accumulated entries into the Zotero database and always attached a pdf file of the reference if possible, being stored locally on my computer.
Yesterday I wanted to sync my standalone library with the online Zotero for the first time.
I got the message that my on-line quota was spent before everything was synced.
Therefore, I went to the sync options and unchecked the boxes where it said that attached files will be synced as well.
I than wanted to delete the on-line library, but found this a really tedious process, as I could only select 25 entries at a time to send to the trash, and it showed me it was page 1 of 845 or something. So I gave up on that procedure.
I than stared looking online on deleting an online library and found the purge option. I first unchecked the automatic sync box in the stand alone and then pressed the purge button. Although it said it completed the action, I could still see entries in the online library. So I pressed the purge button again, with the same result.
I decided to log out of the online environment and log in again, to see if it would update the library (i.e. being empty). This was not the case, although about 90% of the entries were gone.
I than naively thought I would resync my standalone with the online library, but now without syncing attached files. Any double entries I would deal with later.
I may have had firefox open to check the online library, although I deliberately opened the online library with Chrome the first few times.
Then I found out that the standalone library would not show me any subfolders anymore, and my main library folder contained only 10% of all entries. I checked the Stand alone Sync tab, and I did not select the sync from online library or other sync options which warned for use only in special circumstances.
Does anyone have an idea what happened?
Luckily I found online how to restore from a locally saved back-up, which worked.
Strangely enough the original "zotero.sqlite" file was still slightly larger than the bak file, despite the fact that in the stand alone library all subfolders were gone?
After this restore I synced the library again with the online library overnight (without attachments)
Now I just get the message at start up of Zotero stand alone that locally stored entries have changed since the last sync (which is odd) and that these local entries have been kept. The error report has ID 1696071367.
Apologies for the long entry, but I hope this will prevent others from having the same experience.
When you create an item in your Zotero library it writes all the data about the item to your zotero.sqlite database. This is what we call metadata. When you attach a file to this item, two things happen. (1) Zotero adds some more metadata to your database to indicate that a file has been attached, records its title, file path, etc. This is what makes the file attachment entry appear in your library. (2) It copies the actual file to your zotero "storage" directory.
When you sync, two things happen. (1) Zotero syncs your database to zotero.org/other computers. This will make your library look the same across all locations (your computer, other computers, zotero.org, etc.). This is what we call "data syncing". Data syncing does _not_ take up any of your sync quota. You can sync as much as you want - it's all free. (2) Zotero syncs your files from your "storage" directory. This is what we call "file syncing". This is the only thing that takes up space online (as far as your quota goes).
When you uncheck "Sync attachment files..." you're telling Zotero to not do step (2) during syncing. What this means is that step (1) is still carried out to completion, so your file attachment entries appear in all of your libraries, but when you actually try and open the file attachment, Zotero can't find the file, because the file itself has not been synced.
When you go online and you click "Purge Storage", all that does is delete the file data from online servers. This part does not sync (i.e. purging storage online does not delete files from your local computer). Generally, this step is not necessary. If you uncheck "Sync attachment files..." in Zotero, it shouldn't matter to you how much of your quota has been used online. The only time when doing this makes sense (other than troubleshooting something) is if you want to use zotero.org syncing to sync files with your group library (that's the only way to sync files in groups) and want to free up some space that may have been used up by file attachments from your personal library.
When you go online and you start deleting items or file attachments, those actions _will sync_ to your local libraries unless you completely disable syncing and _never_ re-enable it. The moment you re-enable syncing, Zotero _will_ sync those deletions back from the server. Best case scenario, you will not be able to sync because you will have sync conflicts (as you did above) and you will be able to perhaps avoid losing your data (there are ways to ignore deletions of the server if you did something unintentionally. ask us how if you're in this situation). In general, if you're trying to free up space, don't go deleting things from online library, do it from your local library, because that's effectively what you will be doing anyway.
Restoring your database from a backup does not help you prevent changes from syncing _from_ zotero.org. Your old database will know that it synced some time in the past and will request zotero.org for all the actions that were performed since. All the deletions/edits will then sync down. If you find yourself in a situation where you need to restore an old database and prevent such changes from syncing post to the forums and ask for assistance
One note (which may explain why you did not lose your data after restoring your old database and syncing), when you delete items online, they will go into trash. They will not actually be deleted from your library. Items in Trash do sync, so your deletions (moving to trash) synced to your local library. Another possibility is that you may have used the "Remove from collection" button instead of "Move to Trash", which probably acted in a similar fashion (as far as this paragraph is concerned). You thought you lost your data, panicked and restored from backup. You could have restored the items from Trash instead, but note that this would not have restored your collections. Collections are deleted permanently. When you restored your old library, there must have been a sync conflict between you moving things to trash (i.e. removing them from collections) and something else (not sure what else you did in your local library to cause this conflict). In a case where there is a conflict in which items have been removed from collection or not (same with tags), Zotero will always choose to keep items in collections. This caused you to regain the items in their original collections.
In conclusion,
Zotero sync is NOT a backup solution. You should maintain a regular backup of your Zotero data.
So what probably happened is that by deleting individual entries from the online library (and I also started to delete items from trash in an attempt to get a new blanco library to import entries in, without file syncing that time) I induced the deletion of the subfolder system on the on-line library.
However, I do not understand why that also resulted in the subfolder system of my locally stored library to disappear (unless syncing is always two ways and takes effect immediately without a warning that changes (i.e. deletions) will be made to thlibrary stored locally). However, in that case I would never share my online library with others, as their mistakes would also affect my locally stored library.
I do realize that syncing is not the same as back-up and I back-up my entire computer image and all user files to a raid configured NAS (which is still not viewed as a good back-up solution, I know), but which requires les often back-up to an external hard-drive.
I decided to sync as I wanted to access the library on another computer, which has stand alone and firefox installed as well.
So I get now that I should not change (i.e. delete) anything in the on-line library, yet only delete items on the library stored locally if I desire to do so (which will then subsequently sync with the online library?).
However, adding entries to the local library on ANOTHER (i.e non-default computer) will result in syncing with the on-line library and subsequently with the stand alone library of my default computer, correct?
I am planning to check my local library and when I am satisfied to REPLACE the online library with the stand alone version (and from than on only make changes in the local library).
At least that is what I think I need to do to get rid of the error message AND maintain my subfolder structure, correct?
If correct, please advice me how to proceed.
Deleting items (even from the stand alone library) I will not quickly do again, as unused items do not contribute to the quotum (data syncing), correct?
Many thanks again.
If you mean making your library visible online, then you shouldn't worry, because no one else can edit your personal library.
If you mean sharing a library in a group, then you have options, like making the library read-only, but generally, you are probably going to trust the people you are collaborating with to make wise decisions in your group library.
If you mean giving another user your login information so they can access you personal library, then that's up to you, but we don't recommend doing so. They can also use those credentials to sync the library to their computer, which, if mixed with multiple accounts, can cause real havoc. Well, you don't _have_ to. You can use the website to make changes to your library. I just didn't want users to be disillusioned that the changes made on the website will not affect their local data. yes yes Let us know when you're ready to do this (in another thread). But in a gist, you will want to use the "Reset _to_ Zotero Server" option under Preferences -> Sync -> Reset. You'll also want to "Reset File Sync History". This is an exceptional case and these options should not be used generally I would recommend turning off sync (Preferences -> Sync -> Settings; uncheck "sync automatically"), then restoring the backup that you had restored previously if it has all the data that you need. This should give you a cleaner restore, since at this point you had already synced with the online library, but were (at least partly) saved by the conflict resolution. It's not clear what items were not restored during this though. Items themselves, no. However, if the items contain file attachments, then yes, those would be synced and would contribute to your quota. If you let your library grow too big (more than 10,000 items or so) you may start seeing some performance degradation, so keeping a ton of items you don't need is not really advisable either. They will also clutter up your library when you try to find items to cite.
Answer:
I would recommend turning off sync (Preferences -> Sync -> Settings; uncheck "sync automatically"), then restoring the backup that you had restored previously if it has all the data that you need. This should give you a cleaner restore, since at this point you had already synced with the online library, but were (at least partly) saved by the conflict resolution. It's not clear what items were not restored during this though.
New question/comment:
What you described is what I did yesterday evening.
The only thing what I did next was turning sync automatically back on.
If I want to work (albeit infrequently) on a non-default computer and be able to access my up to date library, I do not have the option to leave sync automatically off, I think.
If correct, I will get my off-line library as I want it and contact you in a new thread.
Cheers