An admin can take a copy of a workspace at any time: every note in Memory as a
markdown file, plus the database underneath. Paid workspaces take it over SSH;
any workspace can ask support.

## What an export includes

**Memory, as files.** Every note in [Memory](/docs/workspace/memory) as a
markdown file, in the same folders, with its change history.

**The database under Memory.** A PostgreSQL dump of the workspace's GBrain
database. Besides the notes, it holds what Memory doesn't show as files: the
links between notes, facts and their sources, timelines, earlier versions of
each note, raw data, and the search index. Nothing is left out for being
database-only: the `pages`, `links`, `facts`, `timeline_entries`, `raw_data`
and `page_versions` tables all come with it.

**The assistant's own files.** The instructions the assistant follows, its
working notes, and the skills installed on the workspace.

**Files the assistant saved.** Attachments it downloaded from email or Google
Drive, and copies of chat files it opened.

## What an export leaves out

**Chat history.** Conversations are kept in GBrain's own database, not on
the workspace's server.

**Files dropped into chat.** GBrain keeps the original of every file dropped
into a conversation, byte for byte, in GBrain's file storage rather than on
the workspace's server. Anyone in the workspace can download a file again from
its conversation.

**Sign-ins for connected accounts.** Never exported. Connect Google and other
accounts again wherever the copy ends up.

**Account records.** Members, the plan, billing, and the activity log of what
connected AIs did stay with the GBrain account.

Chat history and chat files may be added in the future. If a workspace needs
them, write to [support@gbrain.io](mailto:support@gbrain.io).

## Following a claim back to its source

The assistant files each fact with a citation naming its source, and a note
about a document names the document. So a claim leads to its note, the cited
source, and the file's name.

Two things aren't kept: the exact passage behind a claim, and a link from a
note to the original file. In GBrain's terms, hosted workspaces don't run atom
extraction, so there are no atoms with source quotes, and a fact's source is a
short label rather than a quote.

When the exact wording matters, say so as the file goes in: "Keep the full text
of this paper as its own note." The full text then lives in Memory, where it
comes with an export and any claim can be checked against it.

## Taking a copy over SSH

On a paid workspace, an admin can take the copy directly. In the workspace's
settings, open SSH (under Developer), turn it on, and add a key. The page shows
the workspace's address, which looks like `brain-123@gbrain.io`.

From a terminal, set that address and run three commands:

```bash
ADDR=brain-123@gbrain.io
ssh $ADDR 'pg_dump -h 127.0.0.1 -U gbrain -Fc gbrain' > database.dump
ssh $ADDR 'tar czf - -C /data brain' > memory.tar.gz
ssh $ADDR 'tar czf - -C /data/.openclaw workspace' > assistant.tar.gz
```

`database.dump` restores with `pg_restore` into PostgreSQL 17 or newer with
pgvector. `memory.tar.gz` is Memory as files, with its git history, and
`assistant.tar.gz` is the assistant's own files. Everything else the assistant
saved is under `/data`, where every SSH session starts.

The GBrain command line is installed there too, pointed at the same database:
`ssh $ADDR gbrain --help` lists what it can do.

The address takes commands and shells, not SFTP, so use `ssh` as above; scp
and SFTP apps won't connect. Free workspaces can't turn on SSH and ask support
instead.

## Asking support for a copy

Email [support@gbrain.io](mailto:support@gbrain.io) from an admin's address and
name the workspace. GBrain sends back a download link once the export is built.