Changing accounts without deleting local library

This discussion was created from comments split from: Connection to syncing wihtout losing locale library.
  • I have a very related problem. About ten years ago, I accidentally merged my library with a coworker's. I don't know how I did it, but I learned how dangerous syncing is. He reprimanded me severely, but had a backup, and there was no real problem. I started used Zotero Standalone portable (in a pendrive, I have both the program and the library locally). We went our separate ways.

    I've been very happy for a decade with my purely local setup. I had my backups and I didn't need to sync at all.
    But now my corporation has forbidden the use of pen drives. I want to sync again with zotero.org.

    My old library was still in zotero.org. It was de-fusioned, in the sense that it was old, but was not merged with my coworker's. It was ancient, though. I had completely remade all my local library, and the library on zotero.org had very little resemblance with my present one.

    No matter what I do: 1) just sync, 2) "Replace online library", or whatever, zotero keeps showing the ominous "If you continue, data associated with the ‘[old coworker's username]’ account will be removed from this computer." message. I am incapable of making the library in zotero.org resemble my local library. I've even deleted my old account, registered for a new one, set zotero preferences for syncing with that one, and I still get the message, and my local library gets overridden by the old one in zotero.org (In the last case, in which I registered for a new account, it reverts to a blank one, of course). What should I do?
  • Zotero prevents switching accounts without deleting local data that's been synced to another account, specifically to prevent accidentally merging two libraries. Since the library you're using was previously synced with another account, you can't sync it directly with a new one.

    Your only option is to export your library to Zotero RDF with files, set up syncing with the new account (which will clear the local data), and then reimport into the new library. Note that the Date Added/Modified values will be reset, and you'll lose links to your items from any word processor documents (since those use identifiers based on the old account). If you're using the Zotero beta, PDF annotations also wouldn't be imported, though you can choose to embed annotations into the PDF file and transfer those back to Zotero for each PDF later from the PDF reader.

    Depending on what exactly is in the existing zotero.org library, you may want to use Replace Online Library to overwrite that rather than just syncing, which would merge the online data with the data imported using Zotero RDF.
  • That was slow, but worked like a charm. A thousand thanks.
  • Oh, no! Not like a charm! Standalone notes are missing, both from the local library and in the zotero.org library!

    Child notes are in their place, inside the parent references.

    That seems like a bug, doesn't it?
  • edited 7 days ago
    How exactly did you trigger the export? Standalone notes are exported and reimported for me, as long as "Export Notes" is selected in the export dialog.

    If you open the .rdf file in a text editor (e.g., Notepad or TextEdit) and search for some text that was in the standalone notes, do you see it?

    If not, did you make a backup of your Zotero data directory before switching accounts?
  • I start again from the beginning

    1. I erase mi local ZoteroPortable>Data>profile folder
    2. I substitute it with the backup "profile" folder that I had stored anteriorly, just in case.
    3. I open Zotero and I check my library is ok. That's the library I want, that I've been curating for years, and that I want now synced.
    4. I try to sync. It shows the message "This Zotero database was last synced with a different account ("old coworker's name") from the one you're attempting to sync with ("damiangb"), etc, etc
    5. I click cancel
    6. I click on "My Library" on the left pane. I don't think it's necessary. It's just in case. So the center pane shows a list of all my things.
    7. I go to the "File" menu, and click on "Export Library"
    8. In the dialog box, I check that everything is ok. Format=Zotero RDF, Export notes is checked, Export Files is checked.
    9. I click ok and it saves the library in a folder called "My Library" in my Desktop.
    10. With the explorer, I have a peek into the "My Library" folder, the one I just exported. It has two things inside: one "My Library.rdf" file and a folder called "files". Inside "files" there are a lot of numbered subfolders. But there are 2164 folders, while in my Zotero library there are "2759 items in this view", according to the right pane. I suppose that's normal...
    11. I go back to my local zotero and sync (curved arrow on the upper right). It shows the message "this was synced with a different account" again. But this time, I check on "Remove all data for "coworker's name" on this computer and "switch accounts".
    12. This second time the library is not blank, of course (because I've started from the beginning, but there were already things in zotero.org because of the operations I did yesterday). I note that the standalone notes have not really disappeared, I was wrong. They have "gone out" of their collections. For example, I had a big set of assorted quotes in a collection called "Citas" ("quotes" in spanish). Now, that collection is almost empty, except for a video and a pair of jpgs. The standalone notes are in the library, just not in the collection anymore.
    13. I don't know well what to do now with my exported library in "My Library". I go to the menu bar and then File -> Import. I arrive to the folder I previously exported and choose to open, that is, to import, the "My Library.rdf" file.
    14. In the next dialog box, I leave checked the "Place imported collections and items into new collection". I didn't do that the first time (yesterday), because I had a blank library. But now I fear everything will be duplicated. I leave checked the "copy files to the zotero storage folder". I click "Import". It takes several hours. "2754 items were imported".

    So now I have, inside my library, a collection also called "My Library", which is a replica of the rest of the library. But the problem persists. Child notes are correctly ubicated under their parent items. But standalone notes are not. They are in the library, but loose, not in any collection.
  • edited 5 days ago
    I note that the standalone notes have not really disappeared, I was wrong. They have "gone out" of their collections.
    OK, you didn't need to go ahead and reimport — just telling us that you reported the problem incorrectly originally would've been the place to start. Now you just have duplicates of everything. You can right-click on the new collection, select Delete Collection and Items, and empty the trash to clear the duplicates.

    I can reproduce the problem of standalone notes not being re-added to collections after an export/import. We'll investigate and report back.
  • @damiangb: OK, the problem with standalone notes in collections should be fixed in the latest Zotero beta. If it's not easy to repopulate the collections manually, you can install the beta, delete everything in the library, and repeat the import. (The beta version will upgrade your database, but you'll be able to switch back to the release version of Zotero when Zotero 6 is released.)
Sign In or Register to comment.