
How will hardcoded profile paths in prefs.js and elsewhere get updated if I move my profile folder to a new computer?
Moving from a Win 7 (v. 115.8.1) to Win 10 (v. 138.0.1) installation. I don't keep my profile in the default location in AppData but rather on a separate drive for data G:\tanguero88\mail\Thunderbird\... which on the new computer would just be H:\Thunderbird\ ... (i.e., not the same path).
No problem following the instructions at https://support.mozilla.org/en-US/kb/moving-thunderbird-data-to-a-new-computer and even editing profiles.ini if necessary. The concern that I have is that the profile location is hardcoded in several files withing the profile folder, specifically prefs.js, folderCache.json, permissions.sqlite (binary file), addonStartup.json.lz4 (binary file) and extensions.json.
E.g. especially in prefs.js there are many user_pref entries that have the foldername embedded such as this one:
user_pref("extensions.bootstrappedAddons", "{\"es-AR@dictionaries.addons.mozilla.org\":{\"version\":\"2.6.3.1\",\"type\":\"dictionary\",\"descriptor\":\"G:\\\\tanguero88\\\\Mail\\\\Thunderbird\\\\Profiles\\\\p271pzrc.default\\\\extensions\\\\es-AR@dictionaries.addons.mozilla.org\",\"multiprocessCompatible\":false,\"runInSafeMode\":false,\"dependencies\":[],\"hasEmbeddedWebExtension\":false},\"pt-PT@dictionaries.addons.mozilla.org\":{\"version\":\"18.4.18.2\",\"type\":\"dictionary\",\"descriptor\":\"G:\\\\tanguero88\\\\Mail\\\\Thunderbird\\\\Profiles\\\\p271pzrc.default\\\\extensions\\\\pt-PT@dictionaries.addons.mozilla.org\",\"multiprocessCompatible\":false,\"runInSafeMode\":false,\"dependencies\":[],\"hasEmbeddedWebExtension\":false}}");
and others with pointers to addons and some whose function is not really evident.
Obviously, just copying the folder to the new computer and pointing the new Thunderbird installation to the new folder is not going to update these hardcoded filenames in the new installation without some kind of a "smart" import feature that makes all these little changes. It seems quite tedious (though not impossible) to go in with a text editor and do all these manually, though even then the .lz4 and .sqlite are binary files so not that easy either. And if I don't update, it would seem that something, sooner or later, will break!
This does not seem to have been documented in any of the articles on the subject that I've read. So what's the deal? Will Thunderbird recreate these? Will it choke on it? Will I just silently lose whatever settings these user preferences correspond to?
Thanks!
Ọ̀nà àbáyọ tí a yàn
From my experience it would be good enough to just manually update prefs.js with the new path. You can indeed use a text editor and do a search and replace of the existing path G:\tanguero88\Mail\Thunderbird\\Profiles\p271pzrc.default with the new one. Needless to say, make sure to keep a backup copy of the original prefs.js file. Also make sure to adjust profiles.ini accordingly. For some reason extensions can be disabled and grayed out after this. To fix this you can try to remove a simple extension which doesn't have it's own config. Restart Thunderbird and re-install the extension. You may need to restart Thunderbird twice after this, to get all installed extensions operational again.
I did this successfully multiple times on a Linux machine, and I wouldn't expect this being any different on Windows.
Ka ìdáhùn ni ìṣètò kíkà 👍 1All Replies (2)
Ọ̀nà àbáyọ Tí a Yàn
From my experience it would be good enough to just manually update prefs.js with the new path. You can indeed use a text editor and do a search and replace of the existing path G:\tanguero88\Mail\Thunderbird\\Profiles\p271pzrc.default with the new one. Needless to say, make sure to keep a backup copy of the original prefs.js file. Also make sure to adjust profiles.ini accordingly. For some reason extensions can be disabled and grayed out after this. To fix this you can try to remove a simple extension which doesn't have it's own config. Restart Thunderbird and re-install the extension. You may need to restart Thunderbird twice after this, to get all installed extensions operational again.
I did this successfully multiple times on a Linux machine, and I wouldn't expect this being any different on Windows.
Thanks Christ1, that's what I was planning to do (if I didn't get any other suggestions for more automated ways of doing the same). I do agree with a comment on one of the various threads on the subject that there really needs to be a simple "Move to new machine" script or a more hand-holding procedure that automates all this. Everyone moves machines every few years (I tend to hold out longer than most just because of this sort of thing but I finally maxed out with 9 years on my old machine!). And not everyone will be grep- and text-editor savvy these days. Just too many pieces of information scattered in many different places that all have to be coordinated manually for what should be a routine operation.
But good to have the reinforcement that someone else tried the same and ended up with the same conclusion. And thanks too for the tips on getting the extensions to work (I use extensions more on Firefox than on Thunderbird so not a deal-breaker for me anyway).
I will mark this "solved" since I think between the info in my post and your reply (and the basic information from the link included), it pretty much sums it up. For those who may come across this post in the future, I will point out that in prefs.js at least, each "\" in the pathname seems to appear as four ("\\\\") -- multiple layers of escapes I guess. So be aware of that and respect the number of backslash separators when doing the global search+replace!
Ti ṣàtúnṣe