L Loach Docs
Ctrl K

Data management

Settings → Data is where backups, restores and cleanups live. Loach stores everything local-first, so you are the one who decides where your data goes - and you can take it with you.

Storage breakdown

A read-only breakdown sits above the controls, so “how big is this?” is answered before you reach for a destructive one:

The five lines measure the content Loach stores, so they add up to less than the on-disk total. The file itself doesn’t shrink when you delete things - SQLite keeps the freed space and reuses it for new data.

Export data

Export data writes a single JSON backup - loach-export-YYYY-MM-DD.json by default - with every chat (archived ones included), message, folder, Space with its sources and memories, global memory, Snippet, snippet variable and saved fill-in, MCP server and setting, plus your Library - texts, files, links and datasets, and which chats and Spaces use them. Each Space’s and chat’s source mode and image scaling go along too. The native save dialog opens and the app’s backend writes the file; the panel then confirms the path it saved to. There is no size limit, and if writing fails part-way, the unfinished file is deleted rather than left behind looking like a backup.

Some things are deliberately left out:

This is the canonical backup format. Keep one before you do anything risky - OS reinstall, machine swap, experimental settings. Backups are tagged loach/v2: Loach 1.5 and earlier refuse them, while older loach/v1 backups still import here.

Import data

Import data restores a file made by Export data. It replaces everything in the database - chats, Spaces, your Library (texts, files, links and datasets), memories, Snippets, MCP servers and settings - so Loach first shows a confirmation, asks for your current credentials if app lock is on, and only then opens the file picker. A backup made before the Library existed leaves it empty. Your stored OpenAI-compatible API key and the app lock aren’t touched, and while a key is stored the backup can’t change the OpenAI-compatible base URL either: the current one is kept, so your key is never sent to a server the backup names.

The file is checked before anything is written: it has to be a Loach backup, and every MCP server, message role and provider in it is re-validated, so a hand-edited file can’t smuggle in a server pointing at a link-local address. Local (stdio) MCP servers arrive disabled - turning one on asks for your consent again - and so does any server whose host couldn’t be resolved during the import. A server whose name breaks the naming rules is renamed rather than failing the import. Rows that point at something the file doesn’t contain are settled: a chat whose Space or folder is missing comes back outside it, and rows that can’t stand on their own are dropped. On success the panel lists what came in (chats, messages, Spaces, Snippets, Library items, datasets, variables, MCP servers) and Loach reloads.

Archive all chats

Moves every live chat to the archive after a confirmation, unpinning them on the way. Replies still running in those chats are stopped, and the chat on screen is closed. Nothing is deleted - unarchive any of them later from Settings → Archive.

Remove my data

In the Erase & Reset card, click Erase… and pick Remove my data. It deletes all chats and folders, Spaces (with their sources and memories), your whole Library (texts, files, links and datasets, with its search index), global memories, Snippets, snippet variables and saved fill-ins, and MCP servers. It keeps your settings, the stored OpenAI-compatible API key and the app lock, so the app remains usable immediately afterwards.

Use this when you want a clean conversational slate but do not want to redo all your provider setup.

Factory reset

The other option in the same dialog: everything Remove my data deletes, plus all settings, plus the OpenAI-compatible API key and the app lock from the credential store. Loach reloads straight into onboarding, like a fresh install. Irreversible.

Use this when handing the machine to someone else, or as the last step in “start completely over”.

All of this is destructive

Both erase options make you type YES - plus your current credentials when app lock is on - and run as soon as you press the red button; Import data overwrites everything the same way. None of them can be undone, so run Export data first if there is any chance you might want your data back.