Skip to content

Instantly share code, notes, and snippets.

@aviv926
aviv926 / Recovering Firefox Tabs from recovery.baklz4.md
Last active August 14, 2025 13:33
Recover lost Firefox tabs after a system crash, SSD failure, or when your drive goes into read-only mode. This guide explains how to restore your browsing session from the recovery.baklz4 file found in your Firefox profile folder. Includes step-by-step instructions, the exact file paths you need, and references to tools for decompressing and con…

Recovering Firefox Tabs from recovery.baklz4 (Drive Failure Guide)

If your drive fails and goes into read-only mode (like my Samsung 980 Pro did), Firefox may lose the usual sessionstore.js file used for restoring tabs. However, there’s still hope — Firefox stores active tabs in different files depending on its state:

  • When Firefox is running → Tabs are saved in: profile.folder\sessionstore-backups\recovery.baklz4
  • When Firefox is not running → Tabs are saved in: profile.folder\sessionstore.js
    In my case, because the browser crashed with the drive, sessionstore.js didn’t exist. The only survivor was recovery.baklz4.

Steps to Restore Tabs

@aviv926
aviv926 / Immich backup script for Windows
Last active October 1, 2024 12:54
Full disclosure: This script was created with an AI assistant, and it worked for me.
# Variables
$containerName = "immich_postgres"
$backupFile = "immich_dump.sql.gz"
$backupPath = "/tmp/$backupFile" # Path inside the Docker container
$backupFolder = "$Env:USERPROFILE\Desktop\Immich DB backups" # Folder on Windows desktop to store backups
# Ensure the backup folder exists; if not, create it
if (-not (Test-Path -Path $backupFolder)) {
Write-Host "Creating backup folder at $backupFolder..." -ForegroundColor Cyan
New-Item -ItemType Directory -Path $backupFolder