Skip to content

How to convert session information from old TST 0.19.x to new TST 2.x

YUKI "Piro" Hiroshi edited this page Mar 15, 2018 · 29 revisions

(generated by Table of Contents Generator for GitHub Wiki)

Due to limitation of WebExtensions APIs, TST 2.x cannot migrate TST 0.19.x's tree structure information embedded in Firefox's session information. So you need to migrate the session data manually with treestyletab-sessionstore-migrate.

Before migration from Firefox ESR52 or some versions older than Firefox 57

  1. Update Firefox to Firefox 57 or later at first.
  2. Start Firefox 57 (or later) and restore last session, to migrate session information of Firefox itself. You'll see plain (not nested) tabs in TST's sidebar. Don't worry, this is an necessary step.
  3. Quit Firefox to flush session information as the file sessionstore.jsonlz4. Please don't do following steps with running Firefox, because that will cause data loss! For safe migration, you must stop Firefox completely.

On Windows

Using pre-built binary

Download the treestyletab-sessionstore-migrate.exe command at first.

Note: If you are using Norton or something other security tool, such a non-signed executable file can be blocked as a dangerous trojan. Then you'll need to disable your security tool or try another way without executable file.

Now you are ready to migrate. Start "command prompt" and go to the profile directory. You can see the path to the profile directory via about:support. Then, put the exe file to there and run it for sessionstore.jsonlz4 and other jsonlz4 files under sessionstore-backup directory, like:

C:\Users\(username)> cd %AppData%\Mozilla\Firefox\Profiles\xxxxx.default
C:...> rename sessionstore.jsonlz4 .\sessionstore.jsonlz4.bak
C:...> move C:\Users\(username)\Downloads\treestyletab-sessionstore-migrate.exe .\
C:...> treestyletab-sessionstore-migrate.exe sessionstore.jsonlz4.bak sessionstore.jsonlz4

...or from backups in folder "sessionstore-backups", e.g.

C:\>cd C:\Users\(username)\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxx.default

C:\Users\(username)\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxx.default>copy sessionstore-backups\previous.jsonlz4 sessionstore.jsonlz4.bak

C:\Users\(username)\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxx.default>rename previous.jsonlz4 sessionstore.jsonlz4.bak

C:\Users\(username)\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxx.default>treestyletab-sessionstore-migrate.exe sessionstore.jsonlz4.bak sessionstore.jsonlz4

Using npm package

Install Node.js 8.6.0 or later at first.

Then start "Node.js command prompt", and install the treestyletab-sessionstore-migrate package globally:

C:\Users\(username)> npm install -g treestyletab-sessionstore-migrate

Now you are ready to migrate. Go to the profile directory. You can see the path to the profile directory via about:support. Then, run the treestyletab-sessionstore-migrate command for sessionstore.jsonlz4 and other jsonlz4 files under sessionstore-backup directory, like:

C:\Users\(username)> cd %AppData%\Mozilla\Firefox\Profiles\xxxxx.default
C:...> rename sessionstore.jsonlz4 .\sessionstore.jsonlz4.bak
C:...> treestyletab-sessionstore-migrate sessionstore.jsonlz4.bak sessionstore.jsonlz4

On Linux

Install Node.js 8.6.0 or later at first. If you are using old Node.js, n Nodde version manager will help you to install newer versions of Node.js. Of source you need to install npm also.

Then install the treestyletab-sessionstore-migrate package globally:

$ sudo npm install -g treestyletab-sessionstore-migrate

Now you are ready to migrate. Go to the profile directory. You can see the path to the profile directory via about:support. Then, run the treestyletab-sessionstore-migrate command for sessionstore.jsonlz4 and other jsonlz4 files under sessionstore-backup directory, like:

$ cd ~/.mozilla/firefox/xxxxx.default/
$ mv sessionstore.jsonlz4 sessionstore.jsonlz4.bak # backup for safety! 
$ treestyletab-sessionstore-migrate sessionstore.jsonlz4.bak sessionstore.jsonlz4