Recover NS prefs/data from previous FF profile? (post Firefox Refresh)

Ask for help about NoScript, no registration needed to post
MaybeScript

Recover NS prefs/data from previous FF profile? (post Firefox Refresh)

Post by MaybeScript »

FF updated yesterday for me. This 64.0.2 update created a conflict/instability that I resolved with a Firefox Refresh. https://support.mozilla.org/en-US/kb/re ... d-settings

NS settings (buttons, etc) are intact, but data (whitelist/blacklists) are not present post-FF-refresh. I did not back up through the add-on (which is a simple .txt file), but it seems the FF Add-on data WAS backed up:

From the Firefox Restore page https://support.mozilla.org/en-US/kb/ba ... b=a&as=aaq :
Note: The Refresh Firefox feature creates an Old Firefox Data folder on your desktop, which contains a backup of your old profile folder and its contents. If you recently refreshed Firefox and still have this folder, you already have a complete profile backup.

The "old firefox data" folder on my desktop, created by the FF Refresh, includes a Prefs.js file.

The NoScript site https://noscript.net/faq#qa2_4 indicates that this same prefs.js file includes the NS data that I wish to restore.
Q: Where's my NoScript configuration stored? How can I backup or migrate it? How can I reset it?
A: Your NoScript configuration, including permissions (whitelist/blacklist) and other settings, is stored together with all your Firefox preferences, inside your browser profile folder (prefs.js file). Whenever you backup your browser profile, you are saving the whole NoScript configuration as well.

All the pieces appear to be here. I need help tying them together, and the Firefox site explicitly states that on the recovery-from-old-profile (https://support.mozilla.org/en-US/kb/re ... ld-profile) page that they do not help with instruction on how to accomplish what I mean to do:
Note: Because your preferences and extensions are often the causes of problems, this article *does not explain how to copy these between profiles.* Therefore, if you follow the steps in this article, you will have to reinstall your extensions and reconfigure your Firefox preferences afterward.

This is only a small table/set of URLs, and I am confident that this did/could not have been the cause of my wonky post-update-to-64.0.2 Firefox.

I cannot be the first person to try to find a way to restore my FF/NS preferences from yesterday. Does someone know how to extract/restore the NoScript data/preferences?

(even a Windows Restore/thumbdrive operation would be worth it for me, if that is possible as a last resort)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Recover NS prefs/data from previous FF profile? (post Firefox Refresh)

Post by barbaz »

Did you copy storage-sync.sqlite into your new profile?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux x86_64; rv:56.0; Waterfox) Gecko/20100101 Firefox/56.2.6
MaybeScript

Re: Recover NS prefs/data from previous FF profile? (post Firefox Refresh)

Post by MaybeScript »

barbaz wrote: Mon Jan 14, 2019 12:46 am Did you copy storage-sync.sqlite into your new profile?
No. How do I do that properly? I assume it's:
  • exit Firefox
    DELETE storage-synch.sqlite from new/current profile folder
    COPY storag-synch.sqlite from previous profile folder, to new/current folder
Is that correct?
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Recover NS prefs/data from previous FF profile? (post Firefox Refresh)

Post by barbaz »

MaybeScript wrote: Mon Jan 14, 2019 1:31 am How do I do that properly? I assume it's:
  • exit Firefox
    DELETE storage-synch.sqlite from new/current profile folder
    COPY storag-synch.sqlite from previous profile folder, to new/current folder
Is that correct?
Yes
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux x86_64; rv:56.0; Waterfox) Gecko/20100101 Firefox/56.2.6
Puffolino
Posts: 2
Joined: Thu Dec 03, 2020 10:21 am

Re: Recover NS prefs/data from previous FF profile? (post Firefox Refresh)

Post by Puffolino »

Hm, my firefox crashed today I have got a "old firefox data" directory on my desktop containing the profiles and more. But the "new and refreshed" firefox has an empty profile now... and all configuration of NoScript is gone :(

Is there a way to find the correct database file in the old profile to restore all configuration settings of NoScript?

There are many files in the "old" profile, like storage-sync.sqlite, storage-synch_v2.sqlite and so on...
...but copying these files to the new profile did not show any changes within noscript.
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.60 Safari/537.36 OPR/73.0.3856.208 (Edition beta)
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Recover NS prefs/data from previous FF profile? (post Firefox Refresh)

Post by barbaz »

Puffolino wrote: Thu Dec 03, 2020 10:30 am in the "old" profile, like storage-sync.sqlite, storage-synch_v2.sqlite and so on...
It sounds like you have Firefox 79 or later. So some NoScript settings (including permissions) are stored in

Code: Select all

storage-sync-v2.sqlite
storage-sync-v2.sqlite-shm
storage-sync-v2.sqlite-wal
You need all three files.

Some NoScript settings (e.g. top bar layout, appearance and advanced settings) are stored in storage/default/moz-extension+++<your unique ID for NoScript>^userContextId=<some number>
That unique ID and number maybe different in your new profile.
*Always* check the changelogs BEFORE updating that important software!
-
Puffolino
Posts: 2
Joined: Thu Dec 03, 2020 10:21 am

Re: Recover NS prefs/data from previous FF profile? (post Firefox Refresh)

Post by Puffolino »

Thanks, barbaz...
...now I was sure it has to work, therefore I saw, that Firefox made two directories which look like
5poabcdef.default
ccabcdefg8.default-1600000083

The first time I copied all to the first directory (which contains much more files and folders), now I copied the three files to the second one and it worked!
Did not find the correct extension folder so far (most of the existing have a single 48K file in it or huge databases), but that's not that important.
Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
Post Reply