userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

Upgrading to Safari 18 may lose extensions storage data

Open ACTCD opened this issue 1 year ago • 0 comments

When you upgrade to Safari 18, you may lose any data saved in browser.storage of all extensions, please make sure to back up in advance if you haven't upgraded yet. Please refer to the backup methods provided by each extension.

Scripts files for Userscripts is not affected, they are still stored in the path you specified or the default one. But extension settings data (such as Global exclude list, etc.) may be lost.

However, Userscripts beta (TestFlight) versions can back up and restore settings through the Export and Import buttons on the extension settings page.

The bug appears to affect any extension, so if your extension saves critical data (such as taking notes or save tabs through the extension, etc.), be careful to back up.

If you have already upgraded and are unfortunate enough to encounter this loss issue, there is also a chance to extract and restore the extensions data if you have a Time Machine backup.

Instead of restoring a backup on an old system from Time Machine, you may be able to extract some data by extracting some specific files, but this may require some expertise.

Here are the actual storage paths for the extensions storages, they are some sqlite database files.

Safari 17: ~/Library/Containers/com.apple.Safari/Data/Library/Safari/WebExtensions/ Safari 18: ~/Library/Containers/com.apple.Safari/Data/Library/WebKit/WebExtensions/Default/

[!NOTE]

Please note that you may not be able to restore extensions data by directly copying the old Safari sqlite database files into the new Safari path. Please back up your files before any operation, seek professional support, and do so at your own risk.

ACTCD avatar Sep 20 '24 16:09 ACTCD