TL;DR
If you upgraded to Insomnia 8.0 and lost access to your collections, your data may still be on disk. Start by backing up the Insomnia application support directory, then try exporting through the UI. If that fails, recover requests directly from the SQLite database and migrate the recovered data to Apidog or another API client.
Apidog is a free, all-in-one API development platform. It can import Insomnia collections and supports local data storage without requiring an account. Try Apidog free: https://apidog.com/?utm_source=dev.to&utm_medium=wanda&utm_content=blog-sync
Introduction
Insomnia 8.0 shipped in September 2023 with mandatory cloud login. After upgrading, many users opened the app, saw a login screen, and could no longer access collections they had built over months or years.
Some data loss cases were real, especially where scratch storage corrupted data on certain systems. In many other cases, the underlying SQLite database files were still present on disk but no longer accessible through the updated UI without a Kong account.
This guide covers both paths:
- How to find and back up your existing Insomnia database files
- How to export data from the Insomnia UI if possible
- How to extract requests directly from SQLite
- How to recover from backups if the database is corrupted
- How to migrate recovered Insomnia data to Apidog
Step 1: Back up your Insomnia data directory
Before reinstalling, logging in, upgrading again, or opening Insomnia, make a copy of the existing data directory.
Insomnia stored data in different locations depending on your operating system.
macOS
~/Library/Application Support/Insomnia/
Windows
C:\Users\[Username]\AppData\Roaming\Insomnia\
Linux
~/.config/Insomnia/
Inside that directory, look for files and folders such as:
-
insomnia.db— main database used by older versions -
core/— may contain.dbfiles in versions before 8.0 -
workspaces/— may contain previously exported workspace JSON files
Copy the entire directory to a safe location before doing anything else.
For example, on macOS:
cp -R "$HOME/Library/Application Support/Insomnia" "$HOME/Desktop/Insomnia-backup"
On Linux:
cp -R "$HOME/.config/Insomnia" "$HOME/Insomnia-backup"
If you continue upgrading or uninstalling/reinstalling Insomnia before backing up these files, you risk overwriting or deleting recoverable data.
Step 2: Try exporting from the Insomnia UI
If you can still access the app, export your workspaces immediately.
If you have not logged in to a Kong account, first look for a local or scratch storage option on the login screen. Depending on the version, the wording may be similar to:
- “Use without account”
- “Continue with local storage”
- “Use scratch pad”
If you can enter the app, export each workspace:
- Select a workspace from the left sidebar.
- Open the workspace menu.
- Choose Export.
- Select Insomnia v4 JSON.
- Save the exported file somewhere outside the Insomnia data directory.
- Repeat for every workspace.
If you already have a Kong account and can log in, follow the same export process. If you had previously synced workspaces, the cloud-backed version may contain data that is more complete than what remains on disk.
Step 3: Recover requests from the SQLite database
If the UI does not expose your data, inspect the database directly.
You will need a SQLite viewer such as DB Browser for SQLite:
It is free, open source, and available for macOS, Windows, and Linux.
Open the database
- Launch DB Browser for SQLite.
- Go to File > Open Database.
- Navigate to your backed-up Insomnia data directory.
- Open
insomnia.dbor another.dbfile you find under the Insomnia directory.
Inspect the tables
The exact schema varies by Insomnia version, but useful tables may include:
-
Workspace— top-level workspaces -
RequestGroup— folders inside workspaces -
Request— individual HTTP requests -
Environment— environment variable sets -
Response— stored response history
Use the Browse Data tab to inspect each table.
For requests, look for fields such as:
nameurlmethodheadersbodyparametersauthenticationparentId
Export tables as CSV
In DB Browser for SQLite:
- Select a table in Browse Data.
- Go to File > Export > Table(s) as CSV file.
- Export important tables such as
Request,RequestGroup,Workspace, andEnvironment.
This gives you raw data you can use to manually rebuild your collections.
Step 4: Extract requests with Python
For larger collections, use a script instead of manually copying rows.
The script below reads request data from an older Insomnia SQLite database and prints basic request details.
import sqlite3
import json
db_path = "/path/to/insomnia.db"
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute("SELECT name, url, method, headers, body FROM Request")
rows = cursor.fetchall()
for name, url, method, headers_raw, body_raw in rows:
print(f"Name: {name}")
print(f"Request: {method} {url}")
if headers_raw:
try:
headers = json.loads(headers_raw)
for header in headers:
header_name = header.get("name")
header_value = header.get("value")
if header_name:
print(f" Header: {header_name}: {header_value}")
except json.JSONDecodeError:
print(" Headers: could not parse JSON")
if body_raw:
print(" Body found")
print()
conn.close()
Adjust the SQL query based on the actual columns in your database. You can confirm column names in DB Browser for SQLite.
For example, if your Request table uses different field names, inspect it with:
PRAGMA table_info(Request);
You can run that query in DB Browser’s Execute SQL tab.
Step 5: Recover from backups if the database is corrupted
If the SQLite database is corrupted, recovery options are more limited. Check backups before trying repair tools or reinstalling Insomnia.
Check system backups
Look for snapshots of the Insomnia data directory from before the upgrade.
Common backup sources include:
- macOS Time Machine
- Windows File History
- Backblaze
- iCloud Drive
- OneDrive
- Dropbox
- Other endpoint backup systems
Restore the older Insomnia directory to a separate location, then open the restored database with DB Browser for SQLite.
Do not overwrite your current backup while testing recovered files.
Check git repositories
Some teams store Insomnia exports in a repository. Search your organization’s repos for exported collection files.
Useful search terms:
insomnia
Insomnia
_collection
workspace
Also check git history, not just the current branch:
git log --all --name-only -- '*.json' | grep -i insomnia
Search your filesystem for exports
If you manually exported collections in the past, the files may be in your Downloads folder or project directories.
On macOS or Linux:
find "$HOME" -iname "*.json" | grep -i insomnia
On Windows PowerShell:
Get-ChildItem -Path $HOME -Recurse -Filter *.json -ErrorAction SilentlyContinue |
Where-Object { $_.Name -match "insomnia|collection|workspace" }
Step 6: Migrate recovered data to Apidog
Once you have an Insomnia v4 JSON export, you can import it into Apidog.
Open Apidog here:
https://apidog.com/?utm_source=dev.to&utm_medium=wanda&utm_content=blog-sync
Then:
- Create or open a project.
- Open the import option from the project sidebar or settings.
- Choose Insomnia as the import source.
- Upload the exported Insomnia JSON file.
- Review the imported workspaces, folders, requests, and environments.
Data that typically transfers cleanly
- HTTP methods such as
GET,POST,PUT,DELETE, andPATCH - Request URLs
- Headers
- JSON bodies
- Form data
- Multipart bodies
- Query parameters
- Path variables
- Environment variables
- Folder structure
Data that needs manual review
Review these after import:
- Pre-request scripts
- Post-request scripts
- Custom authentication flows
- Plugin-dependent behavior
- Response assertions or tests
Apidog supports scripting and testing, but script syntax and execution behavior may require adjustment depending on how your Insomnia workspace was built.
Step 7: Verify the migrated collection
Do not assume the import is complete until you test representative requests.
Use this checklist:
- Open the imported environments.
- Confirm base URLs are correct.
- Confirm API keys and tokens are present where expected.
- Run a simple unauthenticated request.
- Run an authenticated request.
- Run a request with a JSON body.
- Run a request that depends on environment variables.
- Check whether scripts or tests need to be rewritten.
Pay close attention to variable substitution. If a request fails after import, check whether the base URL, token, or path variable was imported with a different name.
Avoid this problem in the future
The Insomnia 8.0 migration issue is a reminder that API collections are source material. Treat them like code or configuration.
Export regularly
Schedule a recurring export of your API collections.
A simple backup structure works well:
api-client-backups/
insomnia/
2024-01-01-export.json
2024-02-01-export.json
apidog/
2024-03-01-export.json
If your team is comfortable with git, commit exports to a private repository.
Prefer recoverable storage models
Use tools that make it easy to access, export, or back up your data.
Apidog supports local data storage and imports Insomnia collections. Bruno stores collections as plain files on disk. In both cases, make sure you understand where your API data lives and how to restore it.
Read migration notes before major upgrades
Before installing a major version of any API client, check whether the release changes:
- Login requirements
- Local storage behavior
- Sync behavior
- Export formats
- Workspace migration logic
If storage or account requirements change, export your collections before upgrading.
FAQ
Can I recover Insomnia data without logging in to Kong?
Yes, if your database files are still on disk. Back up the Insomnia application support directory, then open the .db file with DB Browser for SQLite and export data from the relevant tables.
What format should I use when exporting Insomnia data?
Use Insomnia v4 JSON. It is widely supported and can be imported by Apidog, Postman, and other API tools.
Will my environment variables transfer to Apidog?
In most cases, yes. Insomnia environments are included in the v4 JSON export and Apidog can import them. Review imported environments manually, especially if they contain sensitive tokens or production credentials.
What is the difference between Insomnia scratch storage and local storage in other tools?
Insomnia scratch storage was a fallback mode. Tools with a local-first model treat local storage as the primary storage path, which makes backup and recovery easier to reason about.
Can I use DB Browser for SQLite on macOS?
Yes. You can install it from the project website:
Or with Homebrew:
brew install --cask db-browser-for-sqlite
How long does migration from Insomnia to Apidog take?
For a typical collection of 50–200 requests, the import itself usually takes only a few minutes. Reviewing scripts, authentication flows, and test assertions can take longer depending on workspace complexity.
Top comments (0)