[beta] Sync broken after mass conversion from linked to stored files

Report ID: 1192740714
I have been converting several thousand files from linked to stored. At some point I got a red sign that sync wasn't working. After restart, sync stalls, with the same error message every time (see report). What should I do? Thanks!
  • Do you have backup of your zotero.squlite? how do do you change from linked to stored? i usally doing the other way, from stored to linked through Zotfile
  • I do have a backup from this morning. I used Tools → Manage Attachments → "Convert Linked Files to Stored Files…"
  • edited March 11, 2021
    More info:
    I get "annotation' not loaded for item (2134683/1/WF794QSV)"
    Debug ID D458870208
    Debug ID after restart D1869582840.

    Something else that may be related. I got an error at one point, "You are running two instances of Zotero." Now, when I restarted zotero via "Restart with Logging Enabled", the Zotero icon appeared in the wrong place (note two icons in the dock): http://elenarazlogova.org/wp-content/uploads/2021/03/Screen-Shot-2021-03-11-at-5.26.16-PM.png
    Usually there is only one icon in the dock: http://elenarazlogova.org/wp-content/uploads/2021/03/Screen-Shot-2021-03-11-at-5.40.09-PM.png
  • Sorry, it looks like there are some problems with "Convert Linked Files to Stored Files…" in the beta — if you added annotations before converting, those would be lost.

    I'm working on a fix for this right now, but if you have a backup from before you used that function, you should switch back to that, and you can redo the conversion after I've fixed this.
  • @dstillman Thank you for the upcoming fix. I loaded the database from a day earlier, before I did the conversion. I got 30+ annotation conflicts. I tried choosing the local version, with annotations, and got additional errors+the annotation error above. Then I chose the remote version, with annotations removed, and still got the annotation error, but with a different annotation number.

    Could my remote database be corrupted as well? I am a bit worried now because all database backups I have are versions after I switched to the beta.
  • You should be OK — we can help you with any problems. (There also should be a zotero.sqlite.109.bak or 111 or similar backup in your Zotero data directory from when you installed the beta. Make a copy of that for safekeeping.)

    I've pushed the fix for the above issue, so upgrade to that and then try restoring to the backup, and let us know the Debug ID for any sync error.

    Annotation conflicts actually probably aren't dealt with well at the moment, so if you get a conflict resolution window for those, just share the Debug ID and cancel the dialog so we can take a look.
  • Yup, I have 111 and I backed it up just in case--thanks!
    So I upgraded Zotero and now the database that was already there works (my backup from the day before partially synced to the online database, before the sync stopped last time with errors and conflicts). Should I still start again with a clean backup or you think it's ok to continue with this current version?
    In any case, thanks a million for fixing this!
  • If you’re OK losing any annotations you made on the linked files before the conversion, you should be able to stick to that version. If that’s an option, that’s probably the safest way to go.

    Any annotations you made on stored files should be fine.
  • I don't care about annotations since i haven't made many yet, but I already converted several thousand files to stored files, which is now not reflected in Zotero. This means they are unlinked from Zotero and stranded in folders within the storage folder. I will have to recover each manually. It's not the end of the world, since the files are still there, but:

    What if I open my original file from when I got the annotation error the first time around? what will happen? will the database work? and will i see all the stored files, or will those stored references to pdfs be overridden by current linked references from the online version?

    I am inclined to just cut my losses and stay with the version that works, but if you tell me the original version will work, i can try that.
  • I’m not quite sure of everything you did — I wasn’t expecting you to do any CR on annotations and wouldn’t have advised that — so it’s hard to say what to expect. But you can certainly temporarily disable auto-sync and check other versions of the database to see what’s there. I wouldn’t think you’d need to lose the stored-file versions.

    If you find a version of the DB that’s satisfactory and matches what you have in 'storage', you can always replace the online library with that version.
  • Ok, thank you for all your help!
Sign In or Register to comment.