Change user associated with database? (NOTE: Possibly fixed, but verification appreciated.)

So I have a similar issue to the one here: https://forums.zotero.org/discussion/69332/sync-deletes-my-local-database#latest

I messed up my local library and then the mistake was auto-synced to the Zotero server. After mucking about a bit I figured "oh well, I'll just delete this account and start a new one so that it doesn't delete my library on sync". That was a mistake, as well, since it seems the database is linked to a specific user.

Now when I try to sync it tells me that the data is associated with a different user "dkavlak" (my old, deleted account) and that in order to sync my new account "dkavlako" all of the data associated with my old account will need to be deleted from my local library.

Is there anyway to change the user associated with the existing database? I can start from scratch, but I'd really rather not do that and lose all of the date sensitive info if at all possible.

I uploaded the database file, with reference ID 5a301f78b9e58

UPDATE: Since I started writing this, I think I may have fixed the issue. I followed the instructions in "Manual Zotero Database Repair Instructions" (https://www.zotero.org/utils/dbfix/manual) to dump the SQLite file to SQL. Then I edited the SQL file in my text editor to delete everything in the syncCache, as well as changed the userID and username in the settings. It is now syncing and seems to be working fine.

"Should" this work? Is there some obvious error in what I did -- a setting I didn't change but should have -- that will cause problems down the road? The one setting I didn't change, but worry might be relevant is 'localUserKey'. Is this setting tied to my old account at all, or, e.g., just an identifier for my instance of Zotero Standalone?
  • If you haven't actually deleted your account with Zotero.org, it would be easier to undo the changes using the Restore to Online Library function in the Sync->Reset preferences (this is one of the rare circumstances where this function should be used).

    I believe that this should work without issue, but it is definitely not the recommended way to handle the situation. I believe that 'localUserKey' is specific to each instance of the Zotero app and is only used with a database before syncing is set up, but one of the Zotero developers would have to confirm that.

    The major things to check to see if the database is working without issue are one:
    1) Check database integrity in the Advanced pane of Preferences.
    2) Verify that changes are syncing to the Zotero online library.
    3) Verify that any existing Word/LibreOffice documents are still connected to your Zotero library.
  • Yes, you would be better off restoring from a backup (or a new database, if that's what you prefer) and then using Restore to Online Library (which currently requires the 5.0 Beta).

    While you may be fine with the changes you made, we don't provide support for manual SQLite modifications, and the DB integrity check isn't comprehensive — you could easily have detritus in your database that will cause unexpected problems down the line.
  • Thanks to both of you for your replies.

    Dstillman, thanks for letting me know about the "Restore to Online Library" feature in the beta. If I deleted the old account already, would I be able to restore the local database associated with my deleted account to my new account's online library? Or would I still get a similar "data associated with other user" error? Is there documentation or a change-log for the beta build somewhere? I checked out the GitHub site, but don't quite know where I should be looking.
Sign In or Register to comment.