Decided to leave this for anyone else that may be having issues.
I switched from firefox to opera recently.
I gave Opera a shot after something like 10 years to see how the browser is faring. I'm enjoying the workflow. I can have workspaces, and combine them with tab islands, which makes organization very possible.
However, it seems Opera likes to crash often (I've observed this on my computer running Linux, as well as on Windows), which is OK, since it comes back up fast, but sometimes it completely erases the tabs in all workspaces.
With a little bit of guesswork, and searching online I found out that sessions (that is all your tabs, all workspaces) are
stored in $HOME/.config/opera/Sessions
. The format of the files are apparently snss
format, which https://github.com/lemnos/chrome-session-dump
has probably a better explanation/breakdown of it. (You can also run a hex editor or strings
against these files if you
just want to get some of your urls back, though the output is not perfect).
That being said, I decided to simply write a user systemd timer, that calls the posted bash script. The bash script
will attempt to append your opera sessions in a zip file. The zip file is located in $HOME/Documents/opera-sessions-backup.zip
.
The session files will have a timestamp at the end of the file (NB: you want the Session_*
files), which should hint
at when the session was dumped in the disk.
The systemd timer, I set it to call this bash script every 3 hours. You migh want to tweak that for yourself.
you should be able to add these to your user with
systemctl --user enable backup-opera-tabs.service
systemctl --user enable backup-opera-tabs.timer
systemctl --user daemon-reload
I personally have the script for the zip file in ~/.local/bin/
but you should decide if that's right for you.