Skip to main content

Updated 2026-11-03 View as Markdown

Move your GBrain out of a workspace

Take a copy of everything a workspace holds, and load the copy into a GBrain on your own computer or anywhere else.

For a hosted workspace and its own AI; a hosted workspace used from ChatGPT, Claude, Codex or Cursor; GBrain installed on a computer you look after.

Anyone with Shell on in a workspace can take a copy of it at any time: every note in Memory as a markdown file, plus the database underneath. Paid workspaces take it from a terminal; any workspace can ask support. Coming the other way, from your own computer into a workspace, is Move your GBrain into a workspace.

This page is about a workspace’s memory. What GBrain itself holds (an account’s sign-ins, connections, Activity and chat messages, or a workspace’s members, chats, files and usage) is a zip of JSON files you download from a page: Data export on your account for the account’s, and Data protection in the workspace for the workspace’s, which its admins make.

Set up gbrainio

Every command on this page runs through gbrainio, GBrain’s command line. It installs in one line and needs nothing else on your computer.

  1. Install it.

    curl -sSL https://gbrainio.terminalwire.sh | bash
    
  2. Connect your terminal. Run gbrainio terminal connect. It opens a page in your browser (it prints the link too). Leave the workspace you’re moving out of switched on, then press Connect terminal, then copy the command the page shows, gbrainio terminal connect gbp_…, and run it in your terminal within ten minutes. Never share that command: whoever runs it is connected as you.

  3. Find the workspace’s id. gbrainio workspace ls lists the workspaces this terminal reaches with their ids, and whether Shell is on for you in each.

  4. Turn on Shell, if it’s off. Run gbrainio workspace shell -w <id> open to open the workspace’s Shell page. An admin of the workspace turns it on there, for themselves or for you. Free workspaces can’t turn it on.

Free workspaces can ask support for a copy instead (at the end of this page).

Taking a copy from a terminal

Find the workspace’s id with gbrainio workspace ls, keep it in a variable, and make a folder for the copy:

WS=652
mkdir -p ~/gbrain-copy && cd ~/gbrain-copy

Then take the copy. If the workspace was asleep, the first command wakes it and can fail while it comes up; run it again.

gbrainio workspace shell -w $WS -- 'rm -rf /data/copy-out && gbrain export --dir /data/copy-out'
gbrainio workspace shell -w $WS -- 'tar czf - -C /data/copy-out .' > notes.tar.gz
gbrainio workspace shell -w $WS -- 'pg_dump -h 127.0.0.1 -U gbrain -Fc gbrain' > database.dump
gbrainio workspace shell -w $WS -- 'tar czf - -C /data/.openclaw workspace' > assistant.tar.gz
gbrainio workspace shell -w $WS -- 'rm -rf /data/copy-out'

The commands that run inside the workspace are in single quotes, so your own shell passes them along as written.

  • notes.tar.gz is every note as a markdown file, the way GBrain exports them. Any version of GBrain can import it.
  • database.dump is the whole database under Memory. It restores with pg_restore into PostgreSQL 17 or newer with pgvector, and is the most complete copy.
  • assistant.tar.gz is the workspace’s own AI’s files: its instructions, working notes and skills.

Check the copy before relying on it. The number of notes should match:

gbrainio workspace shell -w $WS -- gbrain stats
tar tzf notes.tar.gz | grep -c '\.md$'

Pages in the first is the number of notes in the workspace; the second counts the files you have.

Moving the export into your own GBrain

The notes import into a GBrain on your computer the same way they import into a workspace. If you don’t run GBrain yet, its README covers installing it. Install the version the workspace runs, so nothing about the notes is newer than your GBrain:

gbrainio workspace shell -w $WS -- gbrain --version

A new GBrain can start without an AI provider key:

gbrain init --pglite --no-embedding

Unpack the notes and import them:

mkdir -p ~/gbrain-copy/notes
tar xzf notes.tar.gz -C ~/gbrain-copy/notes
gbrain import ~/gbrain-copy/notes --no-embed
gbrain extract all

--no-embed skips indexing for search by meaning, which needs an AI provider key; leave it off if your GBrain has one. gbrain extract all rebuilds the links between notes from what the notes say. The import ends with a count, like 1204 pages imported, and running it again is safe: notes already in skip as unchanged. A note at the same path as one already in your GBrain replaces it, so if your GBrain isn’t empty, take a copy of it first with gbrain export --dir <folder>.

Then check it the way you’d check any move. gbrain stats should show the same number of pages as the workspace, and gbrain search "a phrase you know" finds a note you remember.

The notes don’t carry everything. Links someone added by hand, rather than writing them into a note, and some timeline entries live only in the database, so gbrain stats shows fewer links and timeline entries than the workspace. database.dump has all of it. It restores with pg_restore into PostgreSQL 17 or newer with pgvector, into the database your GBrain uses.

When everything is where you want it, keep ~/gbrain-copy somewhere you keep backups, or delete it.

What an export includes

Memory, as files. Every note in 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.

Its AI’s own files. The instructions the workspace’s AI follows, its working notes, and the skills installed on the workspace.

Files its AI 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.

The chat history, members, list of files and model usage have a copy of their own: a workspace’s admins download it from the workspace’s Data protection page. It lists each chat file with a link to it and does not hold the files.

Following a claim back to its source

The workspace’s AI 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.

With your own SSH key

If you’d rather use SSH directly, add a key on the workspace’s Shell page. The page shows the workspace’s address, which looks like brain-123@gbrain.io, and the same commands work through it:

ssh brain-123@gbrain.io 'pg_dump -h 127.0.0.1 -U gbrain -Fc gbrain' > database.dump

The address takes commands and shells, not SFTP, so scp and SFTP programs won’t connect.

Asking support for a copy

Email support@gbrain.io from an admin’s address and name the workspace. GBrain sends back a download link once the export is built.