Data, import & export
Loach distinguishes between per-chat context exports, full backups, partial wipes and full resets. Mixing them up is the most common source of confusion.
Import won’t accept my JSON file
“Import data” rejects the file you picked.
Import data expects a full Loach backup - the JSON produced by Settings → Data → Export data. The per-chat Export context Markdown is not an import source; paste it into another chat with Import context instead. The error says which check failed:
- file doesn’t look like a Loach export - the file isn’t valid JSON, or isn’t a backup.
- unsupported export schema - the file uses a backup format this version of Loach doesn’t read. unsupported export schema ‘loach/v2’ means the backup was made by Loach 1.6 or later and you’re restoring it into 1.5 or older, which can’t hold the Library. Update Loach first; newer versions still restore older backups.
- import rejected: MCP server #N … - a server in the file points at a link-local address or has malformed settings, which usually means the file was hand-edited. Fix or remove that server in the file.
- import rejected: chat #N … has unknown provider, or an invalid message role - a chat or message in the file isn’t one Loach could have written.
- Current app-lock credentials are required for this action - the PIN or password you typed in the confirmation didn’t match.
A rejected import changes nothing.
Something is missing after restoring a backup
The import succeeded, but an MCP server is off or can’t authenticate, a chat lost its working folder, or the OpenAI base URL stayed as it was.
Backups leave out anything secret or tied to one machine:
- MCP credentials. HTTP headers, stdio environment variables, passwords or tokens in command-line arguments, and any credentials before the host and every query value in an HTTP server’s URL are scrubbed on export. Re-enter them in Settings → MCP.
- Local (stdio) MCP servers come back disabled, and so does any server whose host couldn’t be resolved during the import. Turning a stdio server on asks for your consent again. See Tools, MCP & folders.
- Working folders. Chats come back without one; pick it again with Add directory in the + menu next to the message box. See Work in folders.
- API key and app lock. Both live in the OS credential manager, not in the backup. On a new machine, add the key in Settings → Providers and set the lock up again in Settings → Security.
- OpenAI base URL. While an API key is stored on this machine, an import keeps your current base URL rather than the backup’s, so the key is never sent to a server the backup names. Change it in Settings → Providers if you meant to switch.
- The Library’s search index. Your Library items come back, but the index isn’t in the backup: Loach rebuilds it in the background after the import. With an embedding model set, search by meaning catches up while the Library header shows Indexing.
“Remove my data” didn’t remove my OpenAI key
After erasing, your OpenAI-compatible API key is still configured.
By design. Remove my data (under Settings → Data → Erase & Reset) removes chats, folders, Spaces, the Library (texts, files, links and datasets), Snippets, snippet variables, MCP servers and memories, but keeps app settings, your stored API key and the app lock. To clear everything, including the key and the app lock, use Factory reset instead.
The database is still large after deleting chats
The Database size in Settings → Data didn’t go down after you deleted or erased chats.
Expected. SQLite keeps the space it frees and reuses it for new data instead of shrinking the file, so the on-disk total doesn’t drop. The lines under it - Chats, Attachments, Spaces, Library, Other - measure what is actually stored, and those do go down. Attachments are inlined into the database, so they are usually the biggest line.