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])?
Upgrade Storage
[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.