Multiple Zotero data directories

edited October 1, 2022
In my computer (PC1: Win 10, Zotero 6.0.15 from PortableApps) I have two directories with zotero data:
D1. path-to-my-PortableApps\ZoteroPortable\Data\profile
D2. C:\Users\myuser\Zotero
Should I aim at having only one? (given the example below in N5, I guess I should)
Is there any way of merging the contents of both and keeping only one? (preferably D1 so it is fully portable)

A few notes on these directories:
N1. I suspect this is not normal. Speculating on the causes...
I was using Zotero from two computers:
PC1: Win 10, Zotero 5.?? from PortableApps. It was having problems with syncing, so I used mostly PC2
PC2: Ubuntu 20.04LTS, Zotero 5.0.96.3
I have recently updated Zotero in PC1 to the current version, and synced fine.
I see now: Edit -> Preferences -> Advanced -> Files and Folders -> Data Directory Location -> Default (C:\Users\myuser\Zotero)
I cannot tell if I had anything different before the update, perhaps it was D1.
N2. D1\storage and D2\storage contain exactly the same 472 subdirectories, so they are (partially) in sync.
N3. D1\storage takes 455MB and D2\storage takes 363MB, so they are not fully in sync.
N4. Both dirs are being modified during Zotero usage. Proof of this, in addition to N2 above, is that files D1\better-bibtex.sqlite and D2\zotero.sqlite have modification dates of the current Zotero session (although not exactly the same, D2 are more recent).
N5. As an example, I have one Zotero item with related data
directory D2a=D2\storage\MUAQ9KPE with
.zotero-ft-unprocessed
directory D1a=D1\storage\MUAQ9KPE with
.zotero-ft-cache
.zotero-ft-info
xx.pdf
If I double click on "ScienceDirect Full Text PDF" for the item, it tries to open D2a\xx.pdf, but it does not exist. The correct file is D1a\xx.pdf
  • Sorry, but we don't have anything to do with the portable version and can't help with it.

    It's normal to have a Zotero profile directory and a Zotero data directory, but if you have two folders with zotero.sqlite and 'storage' in both, that's not right.

    Zotero will store data to your active data directory, which is the one shown in the preferences.
  • @dstillman your answer was most useful.
    It is quite understandable that this forum might not provide answers related to the PortableApps (PA) version. At the same time, some issues might have a solution which applies irrespective of the version. Perhaps, and hopefully, this is my case, and I appeal to that possibility. You are already helping diagnose the problem.

    What I further found (some of this unrelated to the specific PA origin, some related):

    N6. When adding items to my library, they add directories to D2 and not D1. This is normal behaviour.
    N7. These new directories, synced from D2, are added to D1 when opening Zotero again. This is PA behaviour.
    N8. I have an empty C:\Users\myuser\AppData\Roaming\Zotero\Zotero.
    But I have
    D3=C:\Users\myuser\AppData\Roaming\Zotero.BackupByZoteroPortable\Zotero with Profiles\mdq5llje.default and profiles.ini. The last modification time is for profiles.ini, on 1/7/2020, so I suspect this is not used anymore.
    I also have D4=path-to-my-PortableApps\ZoteroPortable\Data\Zotero\Zotero\Profiles\m97vowld.default. The last modification time is for some files in there, e.g., cert8.db and key3.db, on 9/11/2022. I don't know what actions are supposed to change file in here.
    N9. When making changes to the database, the file updated is D1\zotero.sqlite, taking 22MB now. File D2\zotero.sqlite, taking 15MB now, is a few hours old, so it is often udpated; I still don't know which action triggers its update.
    N9. When making changes to the database, the file updated is D1\zotero.sqlite, taking 22MB now. File D2\zotero.sqlite, taking 15MB now, is a few hours old, so it is often udpated; I still don't know which action triggers its update.
    N10. I have
    directory D1b=D1\storage\Y7YMN578 with
    .zotero-ft-cache
    xxb.pdf
    directory D2b=D2\storage\Y7YMN578 with
    .zotero-ft-unprocessed
    xxb.pdf
    The directory that is linked from Zotero is D1b, and it should be D2b.

    There are some issues described which are clearly PA behaviour.
    Aside from that, I have a couple of questions/suggestions:

    Q1. If I take the contents of D1, as if I had brought it in a pendrive (so the PA origin is irrelevant), does zotero have the capability of "importing" its contents?
    If so, does the import allow for accepting/rejecting items one by one?
    Does the import detect candidates for merging with the current database? And does it allow for accepting/rejecting items one by one?
    Having this might solve my problem by importing, merging, and backing up my unified storage. After complete removal of all Zotero related files I could import that storage.

    Q2. What is the use / contents of files .zotero-ft-cache, .zotero-ft-info, .zotero-ft-unprocessed?
    Directories in D1\storage: most (or all) contain files .zotero-ft-cache; a few contain files .zotero-ft-info (all of these seem to also have .zotero-ft-cache)
    Directories in D2\storage: most contain files .zotero-ft-unprocessed; 5 contain files .zotero-ft-cache; 1 contains file .zotero-ft-info (which also has .zotero-ft-cache)


  • Q1: There's no import, no -- if you have the database (i.e. D1 in your case), you can restore the Zotero database from it on any Zotero installation (https://www.zotero.org/support/zotero_data#restoring_your_zotero_data_from_a_backup_and_overwriting_synced_changes ) but it's not an import as a) you can't add this to an existing database and b) (to answer the second part of your question) your wouldn't be able to select individual items, no.

    Q2: zotero-ft-cache is the cached full-text content of the attachment, which is used to allow for full text searching across devices. I think you'd get both ft-info and ft-cached for PDFs, just ft-cached for other indexed files (like website snaphots). ft-unprocessed is, I believe, meant to be temporary, but someone else would need to confirm that.

    (FWIW, this all sounds to me like D1 is your correct data directory and D2 is something weird)
Sign In or Register to comment.