How to recover scripts into Firefox from file

28 views
Skip to first unread message

Quido Questi

unread,
May 11, 2021, 9:30:11 AMMay 11
to greasemonkey-users
Hi.
My computer went to the silicon heaven and I had to start using a new one.
I don't have a "standard" backups of up-to-date scripts (my fault, I know), but I have an access to the hard-drive from the old computer.
Is there any possibility to recover my scripts from some file(s)?

I've found some tips about %AppData%\Roaming\Mozilla\Firefox\Profiles\&profile-name%\storage\default\moz-extension+++%GUID%\idb\*gyreekansoem.sqlite file, and I tried to copy it to the new profile, but it doesn't work - GM in FF is still without any script.

Thanks for tips and help,
Quido

Quido Questi

unread,
May 11, 2021, 10:49:10 AMMay 11
to greasemonkey-users
Just to clarify my steps:
  1. Shut down FF and deleted the current file *gyreekansoem.sqlite
  2. Start FF again ==> a new, empty *gyreekansoem.sqlite file was created
  3. Shut down FF again
  4. Connect to OLD *gyreekansoem.sqlite file via sqlite3.exe
  5. Dump data to the file
  6. Delete all CREATE commands from file (CREATE TABLE, CREATE INDEX, CREATE TRIGGER)
  7. Import data from dump file into the NEW *gyreekansoem.sqlite file
  8. Start FF <- - - and no scripts were in GM; so the help from the page mentioned above failed here
OS: Windows 10 Enterprise (fully updated)
FF: 88.0.1 (actual version)
GM: 4.11 (actual version)

QQ.

Dne úterý 11. května 2021 v 15:30:11 UTC+2 uživatel Quido Questi napsal:

Quido Questi

unread,
May 11, 2021, 11:31:29 AMMay 11
to greasemonkey-users
And.... it's solved.
I made a stupid mistake, so I hope it will at least help to others :-)
I imported content of the table "database" too - and it contains GUID of the GM extension from the old profile, not from the new one...

So the process is:
  1. Shut down FF and delete the file *gyreekansoem.sqlitefrom in the CURRENT profile
  2. Start FF again and shut down it ==> a new, empty *gyreekansoem.sqlite file is created
  3. Connect sqlite3.exe to the OLD *gyreekansoem.sqlite
  1. Dump data to the file
  1. Delete all commands from dump file except statements
    • INSERT INTO object_data VALUES(1,X'3031...ffff');
      and
      INSERT INTO unique_index_data VALUES(1,X'30...',1,X'30...',NULL);
  2. Connect sqlite3.exe to the NEW *gyreekansoem.sqlite (in the CURRENT profile)
  3. Drop all indexes and triggers
    • DROP INDEX index_data_value_locale_index;
      DROP INDEX unique_index_data_value_locale_index;
      DROP TRIGGER object_data_insert_trigger;
      DROP TRIGGER object_data_update_trigger;
      DROP TRIGGER object_data_delete_trigger;
      DROP TRIGGER file_update_trigger;
  4. Import data from dump file into the NEW *gyreekansoem.sqlite file (in the CURRENT profile)
  5. Start FF - and scripts should be imported
  6. backup immediately and then regularly :-)
QQ.

Dne úterý 11. května 2021 v 16:49:10 UTC+2 uživatel Quido Questi napsal:
Reply all
Reply to author
Forward
0 new messages