Restore an instance from a backup

Bring back your items, files and settings from a backup onto a new install after a lost disk or computer, then reconnect each device.

You need only the backup place: the folder, or the bucket with its prefix and credentials, and not even the server's secrets.

A restore brings back the last backup, so work written after it is lost: up to an hour by default. If the old instance still runs, take a last backup first. Only what your devices hold survives.

Make a new instance and sign in to it

Install one and claim it. Then run marfa login --url <address> --fresh-sign-in and allow it all: the restore needs a sign-in within fifteen minutes, and what it writes, such as guidance, needs more than backups.manage. Or, on its computer, put --socket and the path of its private socket before each command.

Write down the ID on the instance line of marfa status.

Point it at the place and set what it keeps

Set the same place the old instance used, as Turn on backups or Use an object store shows. Until it is set, marfa backups list answers 409 no_backup_destination.

Then set trash_retention_days, the days binned items are kept, before you restore. A restore takes a setting only where the new instance has none, and a shorter value makes the next purge delete items for good. Use the old instance's value, 0 (forever) included, to keep its policy.

marfa config set trash_retention_days <days>

Find the backup

marfa backups list shows the backups in the place, newest first, each with the instance_id of the instance that took it. Restore a row with the old instance's ID; the new one soon lists its own backups too.

Restore it

marfa backups restore 01a1fc38-a2fc-74d9-aa20-7b4106ff9242 20261121T034911.289Z.json

A restore adds what the instance lacks and changes nothing it holds. It carries no key, sign-in, app, webhook or address (what a restore changes). Read blobs_missing in the answer before you call it done. A file the backup names that no store holds makes the restore refuse and name it, and --allow-missing-files restores without it. A file the backup lists as lost, which marfa attention reported when it was taken, restores without the flag and is named only there: upload it again with marfa blobs upload <file>.

The answer names what the old instance left in the backup place, such as backups/<id>. Delete it only once the old instance is retired and a complete new backup of the new one is checked. Never delete a bucket's blobs/, which every instance on the prefix shares.

On each device

The old keys and sign-ins are refused, so connect each device to the new instance. Settle the address first: moving it afterward ends the app sign-ins you just made.

  • The address. On the server's computer, give the new install the old one's --access and --address. Elsewhere, set it. marfa config get shows it.
  • Synced folders. The watch stops each directory: its server now answers as another Marfa instance. Fix a folder says what to do, and one whose removal lists changes it couldn't send follows Keep a directory's unsent edits.
  • Agents, Claude and ChatGPT. Remove Marfa and add it again, as Connect your agent shows.
  • Scripts and connectors. Give each a new key.

To bring back the same instance with its keys, restore a copy of the data directory.

On this page