Create duplicate of existing profile [with new name]?

I use multiple profiles to keep separate papers, etc. related to completely different topics (e.g. History and Science). Creating a new profile is easy enough but installing various plugins and configuring everything is a bit of an [error-prone] chore. Is there a way, either from within Zotero or from the command line, to create a complete copy of a profile including all plugins and settings (but excluding all data [e.g. papers])?
  • I believe just copying the contents of the profile directory (https://www.zotero.org/support/kb/profile_directory ) should work. All data is in the completely seperate data directory.
  • edited yesterday at 7:24pm
    There's more to it than just that as both the data and configuration directories' absolute paths are mentioned a bunch of times in the configuration files. Manually changing those is easy enough but I'm not sure whether there are more subtle things (e.g. indices) that need to be dealt with as well.
  • Experimenting a bit it seems like *all* of the data- and metadata-related files are in the data directory with all presentation- and plugin-related, etc. files being in the profile directory. The following manual process seems to work (but please do correct me if I've missed anything):

    [I'll refer to the human-readable name of the profile being copied as ON, its profile name (the «Path» listed in `profiles.ini`) as OP , and its data directory as OD. Likewise for the profile being created NN, NP, and ND. The following should work on Linux (the platform I use) and MacOS; doing this on Windows is left as an exercise for the reader.]

    1) Create a new profile as normal

    2) Quit out of Zotero (all instances/profiles)

    3) Open a terminal window and enter the Zotero Profiles directory (cf. the above-posted link)

    4) Run:
    mv NP NP.original
    cp -a OP NP
    grep -Rl ON NP/

    5) Open the files listed in a text editor. Change all instances of OP to NP and all instances of OD to ND. Save the files. (In my case the files that needed editing were `NP/pkcs11.txt`, `NP/prefs.js`, `NP/extensions.json`, and `NP/addonStartup.json.lz4`.)

    6) Start Zotero and open the NN profile. The profile should have all of the same plugins and settings as the copied profile (ON) but none of its data («data» includes categories, tags, etc. since they are stored in the profile's data directory [in `zotero.sqlite`]). If all is working fine then the `NP.original` directory can be deleted.
Sign In or Register to comment.