zotero not synching and showing error message
Hi,
For some reason zotero has stopped synching from my mac computer. I added a number of sources on zotero on my mac but they are no longer showing up in the online version of zotero. I have my preferences set to synch so this is not the issue.
The following error message does appear in the top right of zotero on my mac computer so I am not sure if that is causing the issue: Error(s) encountered during statement execution: FOREIGN KEY constraint failed [QUERY: DELETE FROM items WHERE itemID=?] [PARAMS: 4418] [ERROR: FOREIGN KEY constraint failed].
I also have automatic time machine back up set up on my mac computer but this did not previously cause an issue. There are a large number of files/documents set up on my zotero on my mac and I do not want to lose these as it took days to set them up. Any assistance you can provide would be greatly appreciated.
Thanks so much.
Michelle
For some reason zotero has stopped synching from my mac computer. I added a number of sources on zotero on my mac but they are no longer showing up in the online version of zotero. I have my preferences set to synch so this is not the issue.
The following error message does appear in the top right of zotero on my mac computer so I am not sure if that is causing the issue: Error(s) encountered during statement execution: FOREIGN KEY constraint failed [QUERY: DELETE FROM items WHERE itemID=?] [PARAMS: 4418] [ERROR: FOREIGN KEY constraint failed].
I also have automatic time machine back up set up on my mac computer but this did not previously cause an issue. There are a large number of files/documents set up on my zotero on my mac and I do not want to lose these as it took days to set them up. Any assistance you can provide would be greatly appreciated.
Thanks so much.
Michelle
You should also check your database integrity from the Advanced → Files and Folders pane of the Zotero settings.
When I check the database integrity the following message comes up: You can use the database repair tool at http://zotero.org/utils/dbfix to attempt to correct these errors.
Please advise further on how to resolve this issue.
Thanks so much.
If all your data were online, you could just delete the zotero.sqlite database, restart Zotero, and sync to pull down your data. But it sounds like you've added data recently that hasn't synced due to this error (which maybe was happening for a while)?
In that case, you'd have to either try the DB Repair Tool linked from there or restore from a backup. If you've been using Time Machine, you should be able to restore from a backup of zotero.sqlite. You'll need to find one that's after recent data was added (at least as much as possible) but before your database was corrupted.
I understand that I will lose the data if I restore the version that was not corrupted since I added data after the corruption occured. Will I also lose the data if I use the DB Repair Tool? (If so I will have to cross compare the data on my mac with the online version and input one by one the data missing from the online version - I would prefer not to do this as it will likely take days because of all the data on zotero)
I was also wondering if it is possible to determine the source of the corruption to avoid this happening again as it is costing me time which I cannot afford to lose moving forward.
Generally speaking, your database should never get corrupted if it's in the default location on your disk, unless there was actual disk/filesystem corruption. It's much more likely to happen if you've moved your database somewhere else.
If your data directory location is set to the default and you're using Time Machine and syncing, you're really doing everything right, and you should be able to restore a fairly recent version from a backup and/or from syncing.
But both Time Machine and the online library could be a bit behind if you didn't notice when this started happening. In a future version, we'll be making the warning more prominent if syncing isn't happening. No, you would just need to sort both by Date Added or Date Modified, export the recent items to Zotero RDF, delete zotero.sqlite and restart Zotero to sync down a fresh copy of the data, and then import the RDF file.