docs/guides/backup-restore.en.md
Download a workspace backup and restore it into another Huly instance — whether that's a self-hosted deployment or one of the hosted options. This is the recommended way to move your data off a hosted workspace before it becomes unavailable.
[!TIP] Don't want to run your own server? You can also move to one of the existing hosted Huly forks instead of self-hosting. We're glad to help with the data migration either way — just keep in mind that none of these hosting options are free, since keeping servers running costs real money. See Need help? below to get in touch.
dev/tool).Open the workspace and go to:
<your-workspace-url>/setting/setting/backup
(Settings → Backup in the left sidebar.) The page shows when the backup was last taken, how many snapshots and files it contains, and its total size.
[!NOTE] Backups are taken periodically, not continuously, so the latest backup can lag behind your live data by some time. Check Last backup on the page before you rely on it, and give it time to catch up if you just made important changes.
You have two ways to get the files:
.zip
you can keep on your computer. A RESTORE.md with restore instructions is
included inside the archive.curl. The script is safe to save or share:
it does not contain your token — it reads it from the
HULY_BACKUP_TOKEN environment variable, or prompts for it when you run it.Either option produces a folder that the restore tool can consume directly (see Step 2).
[!TIP] Large workspace? Prefer the download script over the button. "Download full backup" assembles the whole archive in your browser's memory before saving it, which can be slow or fail outright once a workspace has a lot of data. The script downloads files one by one with
curl, so it handles large backups more reliably.
You can also expand Backup Snapshots or Backup Files to download individual files, e.g. to verify access or fetch a single snapshot.
[!IMPORTANT] The Not backed up section lists blobs that are intentionally excluded from the regular backup (video, audio, and any file larger than the server's blob-size limit). Their content isn't in the archive or script above — if you need them on the destination, download each one individually from that list before you migrate.
You'll need a Huly platform you control to restore into — either huly-selfhost, a self-hosted deployment built from this monorepo, or another hosted instance where you have admin access. Create the destination workspace first if it doesn't exist yet.
Restoring is done with the backup-restore command of the platform admin
tool (@hcengineering/tool, dev/tool in this repo). Exactly how you invoke
it depends on how the destination platform is run:
tool container
(e.g. docker compose run --rm tool backup-restore ... or
docker compose exec tool ..., adjusted to your compose service name).dev/tool, run it against your
configured environment, e.g. rushx run-local backup-restore ... for a
local dev stack, or your own script that sets the same environment
variables against your real databases.In both cases the command and its arguments are the same:
backup-restore <path-to-backup-folder> <target-workspace> [date] --accounts
<path-to-backup-folder> — the folder you downloaded/unzipped in Step 1.<target-workspace> — the destination workspace's identifier.--accounts — also restores the original users (their profile and social
identities) into the target workspace. Without this flag only documents are
restored, and every member has to be invited again by email.--upgrade — add this if the destination runs a newer model version than
the backup.-m/--merge — don't delete documents that are missing from the backup
(useful when merging into a workspace that already has data).[!NOTE] Restoring accounts (
--accounts) needs its own connection to the account database, configured via theACCOUNT_DB_URL(and optionalACCOUNT_DB_NS) environment variables. Seeserver/backup/README.mdfor the full reference of flags and per-entry-point environment variables.
Once the restore finishes, users sign in with their original email via a one-time code (OTP) — make sure the destination platform can send mail.
Our team is happy to help with migration. Join the Huly community to ask questions and get updates, or email us directly at [email protected].
--accounts and a
valid ACCOUNT_DB_URL; without both, only documents are restored.--upgrade if the
destination runs a newer platform version than the source.