Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

docs(platform): resync backups page for durability work, add demo-data page; regen agent KB

aashu07def49a3461
diff --git a/apps/erp/app/modules/agent/kb/docs/platform/backups.md b/apps/erp/app/modules/agent/kb/docs/platform/backups.md
index f579e67dc5..dbac41585e 100644
--- a/apps/erp/app/modules/agent/kb/docs/platform/backups.md
+++ b/apps/erp/app/modules/agent/kb/docs/platform/backups.md
@@ -1,18 +1,16 @@
# Backups
-> Snapshot a company's data and files, restore it in place with one-click revert, or stand up a new company from a demo template.
+> Snapshot a company's data and files, see at a glance whether each backup can still be restored, and restore in place with one-click revert.
-A backup is a single snapshot of one company: its records, and optionally the files it has uploaded. You make one from **Settings → Backups**, and you do two things with it. You **restore** it over the same company to undo a bad change, or you use it as the starting data for a brand-new company at sign-up. Same file, two jobs.
+A backup is a single snapshot of one company, with its records and, optionally, the files it has uploaded. You make one from **Settings → Backups**, and you do two things with it. You **restore** it over the same company to undo a bad change, or you use it as the starting data for a brand-new company at sign-up. Same file, two jobs.
-Backups are available to anyone with permission to manage **Settings**.
-
-This is a per-company snapshot for cloning environments and undoing a bad change, not a full database dump, and there is no scheduling or point-in-time recovery. Treat it as a working tool, not your only copy.
+This is a per-company snapshot for cloning environments and undoing a bad change, not a full database dump, and there is no scheduling or point-in-time recovery. A backup exists because a person took one, and it stays until a person deletes it. Treat it as a working tool, not your only copy.
## What a backup contains
-A backup captures the company's business data across the whole app: sales, purchasing, items, production, accounting, quality and people. The **i** button next to "Create a backup" opens a "What's in a backup" summary with a live count per area.
+A backup captures the company's business data across the whole app: sales, purchasing, items, production, accounting, quality and people. The **i** button next to "Create a backup" opens a **"What's in a backup"** summary with a live count per area and a **"Total records"** line at the bottom.
-API keys, integration connections and webhooks are deliberately left out of every backup, so a restored or cloned company never carries another company's credentials. Re-connect your integrations after a restore.
+Credentials, integration tokens and webhooks are deliberately left out of every backup, so a restored or cloned company never carries another company's secrets. Re-connect your integrations after a restore.
When you export, **Include** offers two options:
@@ -21,25 +19,70 @@ When you export, **Include** offers two options:
## Create a backup
-On **Settings → Backups**, the "Create a backup" card snapshots the company's data. Give it an optional label, choose **Data only** or **Data + files**, and select **Create backup**. It runs in the background and the finished file appears in the list below, where you can download or delete it.
+On **Settings → Backups**, the "Create a backup" card snapshots the company's data. Give it an optional label, choose **"Data only"** or **"Data + files"**, and select **"Create backup"**. A **"Creating backup…"** row appears in the Backups list right away; the export runs in the background, and clicking the row shows its progress. When it finishes, the row becomes the backup itself, with its date, size and a status badge, and you can **"Download"** or **"Delete"** it.
+
+### If the backup fails
+
+A failed export shows a **"Backup failed"** banner above the list, with the reason and a **"Dismiss"** button. The most common cause is corrupted data, meaning rows that link to data outside this company. A backup carrying those rows could never be restored, so the export refuses rather than write one. The banner says how many rows are affected and offers **"Skip corrupted rows and retry"**, which re-runs the same backup without them. A backup made that way is honest about it: its row shows **"N rows excluded"**, with an **i** popover listing exactly what was left out.
+
+## Is it still restorable?
+
+Every backup row carries a status badge, computed against today's schema each time you open the page. There is no stored verdict and no expiry date, because neither could be trusted: the app keeps evolving after a backup is taken, so the only honest answer is the one checked right now.
+
+ - **Ready**: Loads into today's app unchanged.
+ - **Restorable with changes**: Loads, but some things differ from when it was taken. The restore screen spells out what, and asks you to confirm.
+ - **Not restorable**: A hard refusal, with the reason. The restore button never appears for it.
+ - **Incomplete**: The export died partway and never finished. Not restorable.
+
+The badge is the last line, not the first. Every schema change to Carbon is checked, before it ships, against what existing backups contain, so a change that would strand a backup a customer already holds is caught at commit time. A backup going "Not restorable" is rare by design.
## Restore in place
-Restoring replaces the current company's data with a backup. In the "Restore from a backup" card, pick a **Source** backup, choose whether to also restore its files, and select **Restore**.
+Restoring replaces the current company's data with a backup. In the "Restore from a backup" card, pick a **Source** with **"Choose a backup"**, which lists your backups and also offers **"Upload new backup…"** for a downloaded `.carbon.tar.gz` file from another company or environment. Then choose what to **Include**, **"Data + files"** or **"Data only"**, and select **"Restore…"**.
+
+That opens the **"Restore this company from a backup"** screen, which tells you what this restore will actually change before it runs:
+
+- If the backup loads cleanly, you just confirm.
+- If some fields will be **"Filled with a default"**, the screen lists the affected areas, and you confirm.
+- If some records are **"Discarded"**, meaning they won't come back, the screen lists them and asks you to type `restore` to continue.
+- If the backup **"Can't be restored"**, the screen says why, and there is no confirm button at all.
+- An uploaded backup hasn't been checked yet; any differences are found when the restore runs.
-It is safe to try. Before anything is replaced, Carbon automatically snapshots the company's current state, so a restore is always reversible. When it finishes, the "Restored — review" card asks you to decide:
+Each group names product areas, like Production or Sales, with a **"Details"** expander for the exact fields.
-- **Keep** accepts the restored data.
-- **Revert** rolls the company back to the snapshot taken just before the restore.
+It is safe to try. Before anything is replaced, Carbon saves today's data first, so a restore is always reversible. If the restore can't complete, your data is not changed; it stops before touching anything. When it finishes, the **"Restored — review"** card asks you to decide:
+
+- **"Keep"** accepts the restored data.
+- **"Revert"** rolls the company back to the snapshot taken just before the restore.
A restore stays open for review until you keep or revert it. Starting another beforehand is blocked, so the revert always returns you to the state from just before the last restore.
-## Start a company from a template
+### If the restore is blocked by corrupted data
+
+A restore takes the same safety copy an export does, so the same corrupted rows that fail a backup also fail a restore. The failed restore row explains which rows link to data outside this company and offers **"Remove corrupted data and restore"**. That opens a confirm naming the exact count, **"Permanently delete N rows?"**, and only **"Delete and restore"** proceeds. Deleting them fixes the data instead of hiding it, then the restore runs again. If the rows turn out to be shared with other companies in your group, nothing is deleted and the restore doesn't start.
+
+## Start a company from a backup
+
+The same file powers onboarding. When Carbon staff create a new company, the data step asks how to seed it, and **"Restore from a backup"** sets the new company up from an uploaded Carbon backup of another one. The other option, **"Use a demo template"**, doesn't use a backup at all; it seeds a realistic industry story from scratch. See `docs/platform/demo-data`.
+
+Backups require permission to manage Settings. On production deployments the page is currently limited to Carbon staff while the feature is hardened for general availability; on a local development stack it is open to everyone.
+
+## Troubleshooting
+
+### The Backups page isn't in my Settings menu
+On production deployments Backups is currently visible to internal Carbon staff accounts only; on a local development stack it is open to everyone. Its absence for a regular customer account is expected.
+
+### A backup shows "Not restorable" or "Restorable with changes"
+The badge is computed live against today's schema every time the page loads — there is no stored verdict and no expiry. "Restorable with changes" still restores after you confirm the listed differences on the restore screen. "Not restorable" is a hard refusal; the restore screen shows the reason under "Can't be restored" and offers no confirm button.
+
+### A backup shows "Incomplete"
+The export died partway and never finished writing. An incomplete backup cannot be restored — delete it and create a new one.
-The same backups power onboarding. When you create a new company, the industry step asks how to seed it:
+### "Backup failed" banner with rows that "link to data outside this company"
+Some rows reference data the company doesn't own, so a backup containing them could never be restored. Click "Skip corrupted rows and retry" to back up everything else; the resulting backup's row shows "N rows excluded" with the exact list. To fix the data itself rather than skip it, a blocked restore offers "Remove corrupted data and restore", which permanently deletes those rows behind a confirmation.
- - **Use a demo template**: Adds sample customers, suppliers, parts and quotes for the chosen industry, so you can explore Carbon with realistic data.
- - **Restore from a backup**: Sets the new company up from a Carbon backup of another company.
- - **I don't need data**: Starts with a clean, empty environment.
+### Can't start a restore — told to finish the current one first
+Only one restore can be open per company. Resolve the pending one from the "Restored — review" card (Keep or Revert) before starting another.
-A demo template is just a ready-made backup, one per industry, imported into the fresh company.
+### Restore finished but integrations are disconnected
+Expected — credentials, integration tokens and webhooks are never included in a backup, so they don't survive a restore. Re-connect integrations afterward.
diff --git a/apps/erp/app/modules/agent/kb/docs/platform/demo-data.md b/apps/erp/app/modules/agent/kb/docs/platform/demo-data.md
new file mode 100644
index 0000000000..7df3d58a51
--- /dev/null
+++ b/apps/erp/app/modules/agent/kb/docs/platform/demo-data.md
@@ -0,0 +1,63 @@
+# Demo data
+
+> Fill a company with a realistic industry story, so every screen has something in it, and put back exactly what was there before with one click.
+
+Demo data fills a company with a full, coherent industry story: items with BOMs and routings, customers and suppliers, quotes, orders, jobs, inspections, change orders and ledger entries. Every list screen has rows and every detail screen opens, which makes it the fastest way to explore Carbon, demo it, or test against realistic data. You apply it from **Settings → Demo Data**, or pick it at sign-up as **"Use a demo template"**.
+
+## The templates
+
+Each template tells one industry's story, end to end, across sales, purchasing, production, quality and accounting:
+
+ - **Aerospace & Satellite**: A satellite manufacturer, from RFQs through built and inspected flight hardware.
+ - **Robotics OEM**: A robotics maker building assemblies to order.
+ - **Precision Manufacturing**: A machine shop quoting and cutting precision parts.
+ - **Motor Assembly**: An automotive supplier assembling motors.
+
+Every seeded date is relative to the day you apply the template, so the company always looks live: recent orders, jobs in progress, upcoming due dates. Parts come with real thumbnails, and each industry includes a 3D assembly you can open in the viewer.
+
+Demo data is seeded fresh from Carbon's own dataset definitions each time, not imported from a stored backup file. That's why it always matches the current version of the app. To stand a company up from another company's actual data, use a `docs/platform/backups` instead.
+
+## Apply a template
+
+On **Settings → Demo Data**, the "Apply a demo template" card lists the templates; select **"Apply"** on one. It is safe to try on a company that already has data: Carbon saves a copy of your current data first, then replaces it with the demo story. The page shows each phase as it runs, from **"Saving a copy of your current data"** through **"Adding demo records"**, and it keeps running if you leave the page.
+
+When it finishes, the **"Demo data applied"** card asks you to decide:
+
+- **"Keep"** accepts the demo data.
+- **"Revert"** puts back exactly what was here before.
+
+The choice stays open until you make it, and only one demo-data change can be in flight per company. Applying is all-or-nothing: if anything fails partway, no rows are written and the card shows the error with a **"Dismiss"** button.
+
+If a revert seems stuck, the card says so after a few minutes and offers "Retry revert". The saved copy of your data is kept until the revert succeeds, so retrying is always safe.
+
+## Demo data at sign-up
+
+The same templates power onboarding. When Carbon staff create a new company, the data step asks **"How would you like to start?"**:
+
+ - **Use a demo template**: Sets up sample customers, suppliers, parts and orders for the industry you pick. They appear shortly after you finish.
+ - **Restore from a backup**: Sets the new company up from an uploaded Carbon `docs/platform/backups` of another company.
+ - **I don't need data**: Starts with a clean, empty environment.
+
+Choosing a template then asks **"Which best describes your company?"** and seeds the matching industry. See `docs/reference/onboarding` for the rest of the wizard.
+
+Demo Data sits behind the same gate as Backups, since it replaces a company's data wholesale. On production deployments it is currently limited to Carbon staff; on a local development stack it is open to everyone.
+
+## Troubleshooting
+
+### The Demo Data page isn't in my Settings menu
+On production deployments Demo Data is visible to internal Carbon staff accounts only; on a local development stack it is open to everyone. Its absence for a regular customer account is expected — same gate as Backups.
+
+### I applied a template and want my old data back
+Use "Revert" on the "Demo data applied" card. Carbon saved a copy of your data immediately before applying, and the card stays open until you choose Keep or Revert — reverting puts back exactly what was there before.
+
+### The apply or revert looks stuck
+It keeps running even if you leave the page. If it's been more than a few minutes, the card shows "This is taking longer than expected" and offers "Retry revert" — safe to click, because the saved copy of your data is kept until the revert succeeds.
+
+### Can't apply a second template
+Only one demo-data change can be open per company. Resolve the pending one first — Keep or Revert on the review card (or Dismiss if it failed).
+
+### Applying failed with an error
+Applying is all-or-nothing: a failure writes no rows and your data is unchanged. The card shows the job's error next to "Failed"; Dismiss clears it, and you can apply again.
+
+### The demo dates look recent — is that real activity?
+Yes, by design: every seeded date is relative to the day the template was applied, so the company always looks live with recent orders and jobs in progress.
diff --git a/apps/erp/app/modules/agent/kb/docs/reference/onboarding.md b/apps/erp/app/modules/agent/kb/docs/reference/onboarding.md
index 5df42d39a8..45bf09ddbc 100644
--- a/apps/erp/app/modules/agent/kb/docs/reference/onboarding.md
+++ b/apps/erp/app/modules/agent/kb/docs/reference/onboarding.md
@@ -18,7 +18,7 @@ The steps run in a fixed order (`apps/erp/app/utils/path.ts:2103-2109`):
Two more steps appear conditionally, and only in specific circumstances (`apps/erp/app/routes/onboarding+/_layout.tsx:49-53`):
-- **Industry** — shown only to internal Carbon staff accounts. It offers a demo-data template or a backup restore, so a seeded example company can be stood up. Regular sign-ups never see it.
+- **Industry** — shown only to internal Carbon staff accounts. It offers a `docs/platform/demo-data` or a `docs/platform/backups` restore, so a seeded example company can be stood up. Regular sign-ups never see it.
- **Plan** — shown only on Carbon Cloud, the hosted version at [app.carbon.ms](https://app.carbon.ms). It routes you to Stripe checkout to pick a plan before you enter the app. Self-hosted installs skip it entirely and go straight to `/x`.
Saving the company doesn't just insert one row. It also creates a **"Headquarters"** location from the address you entered (with your local timezone), links your user to the company as an employee, and seeds the tenant's baseline: chart of accounts, default posting accounts, numbering sequences, payment terms, and units of measure. This all happens under the hood via `provisionOnboardingCompany` and a background seed job (`apps/erp/app/services/onboarding.server.ts`; seed via `seedCompany` at `apps/erp/app/modules/settings/settings.service.ts:751-765`).
diff --git a/apps/erp/app/modules/agent/kb/manifest.json b/apps/erp/app/modules/agent/kb/manifest.json
index 9716455556..7173c80c9b 100644
--- a/apps/erp/app/modules/agent/kb/manifest.json
+++ b/apps/erp/app/modules/agent/kb/manifest.json
@@ -138,13 +138,41 @@
{
"slug": "docs/platform/backups",
"title": "Backups",
- "description": "Snapshot a company's data and files, restore it in place with one-click revert, or stand up a new company from a demo template.",
+ "description": "Snapshot a company's data and files, see at a glance whether each backup can still be restored, and restore in place with one-click revert.",
"keywords": ["backups", "docs", "platform"],
"headings": [
"What a backup contains",
"Create a backup",
+ "If the backup fails",
+ "Is it still restorable?",
"Restore in place",
- "Start a company from a template"
+ "If the restore is blocked by corrupted data",
+ "Start a company from a backup",
+ "Troubleshooting",
+ "The Backups page isn't in my Settings menu",
+ "A backup shows \"Not restorable\" or \"Restorable with changes\"",
+ "A backup shows \"Incomplete\"",
+ "\"Backup failed\" banner with rows that \"link to data outside this company\"",
+ "Can't start a restore — told to finish the current one first",
+ "Restore finished but integrations are disconnected"
+ ]
+ },
+ {
+ "slug": "docs/platform/demo-data",
+ "title": "Demo data",
+ "description": "Fill a company with a realistic industry story, so every screen has something in it, and put back exactly what was there before with one click.",
+ "keywords": ["demo", "data", "docs", "platform"],
+ "headings": [
+ "The templates",
+ "Apply a template",
+ "Demo data at sign-up",
+ "Troubleshooting",
+ "The Demo Data page isn't in my Settings menu",
+ "I applied a template and want my old data back",
+ "The apply or revert looks stuck",
+ "Can't apply a second template",
+ "Applying failed with an error",
+ "The demo dates look recent — is that real activity?"
]
},
{
diff --git a/docs/content/docs/platform/backups.mdx b/docs/content/docs/platform/backups.mdx
index adb0651375..58768a2b13 100644
--- a/docs/content/docs/platform/backups.mdx
+++ b/docs/content/docs/platform/backups.mdx
@@ -1,22 +1,20 @@
---
title: Backups
-description: Snapshot a company's data and files, restore it in place with one-click revert, or stand up a new company from a demo template.
+description: Snapshot a company's data and files, see at a glance whether each backup can still be restored, and restore in place with one-click revert.
---
-A backup is a single snapshot of one company: its records, and optionally the files it has uploaded. You make one from **Settings → Backups**, and you do two things with it. You **restore** it over the same company to undo a bad change, or you use it as the starting data for a brand-new company at sign-up. Same file, two jobs.
-
-Backups are available to anyone with permission to manage **Settings**.
+A backup is a single snapshot of one company, with its records and, optionally, the files it has uploaded. You make one from **Settings → Backups**, and you do two things with it. You **restore** it over the same company to undo a bad change, or you use it as the starting data for a brand-new company at sign-up. Same file, two jobs.
<Callout type="warning" title="A backup is not disaster recovery">
-This is a per-company snapshot for cloning environments and undoing a bad change, not a full database dump, and there is no scheduling or point-in-time recovery. Treat it as a working tool, not your only copy.
+This is a per-company snapshot for cloning environments and undoing a bad change, not a full database dump, and there is no scheduling or point-in-time recovery. A backup exists because a person took one, and it stays until a person deletes it. Treat it as a working tool, not your only copy.
</Callout>
## What a backup contains
-A backup captures the company's business data across the whole app: sales, purchasing, items, production, accounting, quality and people. The **i** button next to "Create a backup" opens a "What's in a backup" summary with a live count per area.
+A backup captures the company's business data across the whole app: sales, purchasing, items, production, accounting, quality and people. The **i** button next to "Create a backup" opens a **"What's in a backup"** summary with a live count per area and a **"Total records"** line at the bottom.
<Callout type="warning" title="Secrets never travel">
-API keys, integration connections and webhooks are deliberately left out of every backup, so a restored or cloned company never carries another company's credentials. Re-connect your integrations after a restore.
+Credentials, integration tokens and webhooks are deliberately left out of every backup, so a restored or cloned company never carries another company's secrets. Re-connect your integrations after a restore.
</Callout>
When you export, **Include** offers two options:
@@ -28,31 +26,82 @@ When you export, **Include** offers two options:
## Create a backup
-On **Settings → Backups**, the "Create a backup" card snapshots the company's data. Give it an optional label, choose **Data only** or **Data + files**, and select **Create backup**. It runs in the background and the finished file appears in the list below, where you can download or delete it.
+On **Settings → Backups**, the "Create a backup" card snapshots the company's data. Give it an optional label, choose **"Data only"** or **"Data + files"**, and select **"Create backup"**. A **"Creating backup…"** row appears in the Backups list right away; the export runs in the background, and clicking the row shows its progress. When it finishes, the row becomes the backup itself, with its date, size and a status badge, and you can **"Download"** or **"Delete"** it.
<Screenshot src="/screens/platform-backups.png" label="Settings → Backups, the Create a backup card with the Data only / Data + files choice and the i contents button" caption="Export snapshots the company's data; the contents popover shows a live count per area." ratio="wide" />
+### If the backup fails
+
+A failed export shows a **"Backup failed"** banner above the list, with the reason and a **"Dismiss"** button. The most common cause is corrupted data, meaning rows that link to data outside this company. A backup carrying those rows could never be restored, so the export refuses rather than write one. The banner says how many rows are affected and offers **"Skip corrupted rows and retry"**, which re-runs the same backup without them. A backup made that way is honest about it: its row shows **"N rows excluded"**, with an **i** popover listing exactly what was left out.
+
+## Is it still restorable?
+
+Every backup row carries a status badge, computed against today's schema each time you open the page. There is no stored verdict and no expiry date, because neither could be trusted: the app keeps evolving after a backup is taken, so the only honest answer is the one checked right now.
+
+<FieldTable>
+ <Field name="Ready">Loads into today's app unchanged.</Field>
+ <Field name="Restorable with changes">Loads, but some things differ from when it was taken. The restore screen spells out what, and asks you to confirm.</Field>
+ <Field name="Not restorable">A hard refusal, with the reason. The restore button never appears for it.</Field>
+ <Field name="Incomplete">The export died partway and never finished. Not restorable.</Field>
+</FieldTable>
+
+<Callout type="tip" title="Carbon protects old backups at the source">
+The badge is the last line, not the first. Every schema change to Carbon is checked, before it ships, against what existing backups contain, so a change that would strand a backup a customer already holds is caught at commit time. A backup going "Not restorable" is rare by design.
+</Callout>
+
## Restore in place
-Restoring replaces the current company's data with a backup. In the "Restore from a backup" card, pick a **Source** backup, choose whether to also restore its files, and select **Restore**.
+Restoring replaces the current company's data with a backup. In the "Restore from a backup" card, pick a **Source** with **"Choose a backup"**, which lists your backups and also offers **"Upload new backup…"** for a downloaded `.carbon.tar.gz` file from another company or environment. Then choose what to **Include**, **"Data + files"** or **"Data only"**, and select **"Restore…"**.
+
+That opens the **"Restore this company from a backup"** screen, which tells you what this restore will actually change before it runs:
+
+- If the backup loads cleanly, you just confirm.
+- If some fields will be **"Filled with a default"**, the screen lists the affected areas, and you confirm.
+- If some records are **"Discarded"**, meaning they won't come back, the screen lists them and asks you to type `restore` to continue.
+- If the backup **"Can't be restored"**, the screen says why, and there is no confirm button at all.
+- An uploaded backup hasn't been checked yet; any differences are found when the restore runs.
-It is safe to try. Before anything is replaced, Carbon automatically snapshots the company's current state, so a restore is always reversible. When it finishes, the "Restored — review" card asks you to decide:
+Each group names product areas, like Production or Sales, with a **"Details"** expander for the exact fields.
-- **Keep** accepts the restored data.
-- **Revert** rolls the company back to the snapshot taken just before the restore.
+It is safe to try. Before anything is replaced, Carbon saves today's data first, so a restore is always reversible. If the restore can't complete, your data is not changed; it stops before touching anything. When it finishes, the **"Restored — review"** card asks you to decide:
+
+- **"Keep"** accepts the restored data.
+- **"Revert"** rolls the company back to the snapshot taken just before the restore.
<Callout type="note" title="One restore at a time">
A restore stays open for review until you keep or revert it. Starting another beforehand is blocked, so the revert always returns you to the state from just before the last restore.
</Callout>
-## Start a company from a template
+### If the restore is blocked by corrupted data
-The same backups power onboarding. When you create a new company, the industry step asks how to seed it:
+A restore takes the same safety copy an export does, so the same corrupted rows that fail a backup also fail a restore. The failed restore row explains which rows link to data outside this company and offers **"Remove corrupted data and restore"**. That opens a confirm naming the exact count, **"Permanently delete N rows?"**, and only **"Delete and restore"** proceeds. Deleting them fixes the data instead of hiding it, then the restore runs again. If the rows turn out to be shared with other companies in your group, nothing is deleted and the restore doesn't start.
-<FieldTable>
- <Field name="Use a demo template">Adds sample customers, suppliers, parts and quotes for the chosen industry, so you can explore Carbon with realistic data.</Field>
- <Field name="Restore from a backup">Sets the new company up from a Carbon backup of another company.</Field>
- <Field name="I don't need data">Starts with a clean, empty environment.</Field>
-</FieldTable>
+## Start a company from a backup
+
+The same file powers onboarding. When Carbon staff create a new company, the data step asks how to seed it, and **"Restore from a backup"** sets the new company up from an uploaded Carbon backup of another one. The other option, **"Use a demo template"**, doesn't use a backup at all; it seeds a realistic industry story from scratch. See [Demo data](/docs/platform/demo-data).
+
+<Callout type="info" title="Who can see this page">
+Backups require permission to manage Settings. On production deployments the page is currently limited to Carbon staff while the feature is hardened for general availability; on a local development stack it is open to everyone.
+</Callout>
+
+<AgentContext>
+## Troubleshooting
+
+### The Backups page isn't in my Settings menu
+On production deployments Backups is currently visible to internal Carbon staff accounts only; on a local development stack it is open to everyone. Its absence for a regular customer account is expected.
+
+### A backup shows "Not restorable" or "Restorable with changes"
+The badge is computed live against today's schema every time the page loads — there is no stored verdict and no expiry. "Restorable with changes" still restores after you confirm the listed differences on the restore screen. "Not restorable" is a hard refusal; the restore screen shows the reason under "Can't be restored" and offers no confirm button.
+
+### A backup shows "Incomplete"
+The export died partway and never finished writing. An incomplete backup cannot be restored — delete it and create a new one.
+
+### "Backup failed" banner with rows that "link to data outside this company"
+Some rows reference data the company doesn't own, so a backup containing them could never be restored. Click "Skip corrupted rows and retry" to back up everything else; the resulting backup's row shows "N rows excluded" with the exact list. To fix the data itself rather than skip it, a blocked restore offers "Remove corrupted data and restore", which permanently deletes those rows behind a confirmation.
+
+### Can't start a restore — told to finish the current one first
+Only one restore can be open per company. Resolve the pending one from the "Restored — review" card (Keep or Revert) before starting another.
-A demo template is just a ready-made backup, one per industry, imported into the fresh company.
+### Restore finished but integrations are disconnected
+Expected — credentials, integration tokens and webhooks are never included in a backup, so they don't survive a restore. Re-connect integrations afterward.
+</AgentContext>
diff --git a/docs/content/docs/platform/demo-data.mdx b/docs/content/docs/platform/demo-data.mdx
new file mode 100644
index 0000000000..69d6bd8a36
--- /dev/null
+++ b/docs/content/docs/platform/demo-data.mdx
@@ -0,0 +1,78 @@
+---
+title: Demo data
+description: Fill a company with a realistic industry story, so every screen has something in it, and put back exactly what was there before with one click.
+---
+
+Demo data fills a company with a full, coherent industry story: items with BOMs and routings, customers and suppliers, quotes, orders, jobs, inspections, change orders and ledger entries. Every list screen has rows and every detail screen opens, which makes it the fastest way to explore Carbon, demo it, or test against realistic data. You apply it from **Settings → Demo Data**, or pick it at sign-up as **"Use a demo template"**.
+
+## The templates
+
+Each template tells one industry's story, end to end, across sales, purchasing, production, quality and accounting:
+
+<FieldTable>
+ <Field name="Aerospace &amp; Satellite">A satellite manufacturer, from RFQs through built and inspected flight hardware.</Field>
+ <Field name="Robotics OEM">A robotics maker building assemblies to order.</Field>
+ <Field name="Precision Manufacturing">A machine shop quoting and cutting precision parts.</Field>
+ <Field name="Motor Assembly">An automotive supplier assembling motors.</Field>
+</FieldTable>
+
+Every seeded date is relative to the day you apply the template, so the company always looks live: recent orders, jobs in progress, upcoming due dates. Parts come with real thumbnails, and each industry includes a 3D assembly you can open in the viewer.
+
+<Callout type="note" title="A template is not a backup">
+Demo data is seeded fresh from Carbon's own dataset definitions each time, not imported from a stored backup file. That's why it always matches the current version of the app. To stand a company up from another company's actual data, use a [backup](/docs/platform/backups) instead.
+</Callout>
+
+## Apply a template
+
+On **Settings → Demo Data**, the "Apply a demo template" card lists the templates; select **"Apply"** on one. It is safe to try on a company that already has data: Carbon saves a copy of your current data first, then replaces it with the demo story. The page shows each phase as it runs, from **"Saving a copy of your current data"** through **"Adding demo records"**, and it keeps running if you leave the page.
+
+<Screenshot src="/screens/platform-demo-data.png" label="Settings → Demo Data, the Apply a demo template card listing the four industry templates with their Apply buttons" caption="Applying a template snapshots the company first, then seeds the industry story." ratio="wide" />
+
+When it finishes, the **"Demo data applied"** card asks you to decide:
+
+- **"Keep"** accepts the demo data.
+- **"Revert"** puts back exactly what was here before.
+
+The choice stays open until you make it, and only one demo-data change can be in flight per company. Applying is all-or-nothing: if anything fails partway, no rows are written and the card shows the error with a **"Dismiss"** button.
+
+<Callout type="tip" title="Revert works even after a hiccup">
+If a revert seems stuck, the card says so after a few minutes and offers "Retry revert". The saved copy of your data is kept until the revert succeeds, so retrying is always safe.
+</Callout>
+
+## Demo data at sign-up
+
+The same templates power onboarding. When Carbon staff create a new company, the data step asks **"How would you like to start?"**:
+
+<FieldTable>
+ <Field name="Use a demo template">Sets up sample customers, suppliers, parts and orders for the industry you pick. They appear shortly after you finish.</Field>
+ <Field name="Restore from a backup">Sets the new company up from an uploaded Carbon [backup](/docs/platform/backups) of another company.</Field>
+ <Field name="I don't need data">Starts with a clean, empty environment.</Field>
+</FieldTable>
+
+Choosing a template then asks **"Which best describes your company?"** and seeds the matching industry. See [Getting started](/docs/reference/onboarding) for the rest of the wizard.
+
+<Callout type="info" title="Who can see this page">
+Demo Data sits behind the same gate as Backups, since it replaces a company's data wholesale. On production deployments it is currently limited to Carbon staff; on a local development stack it is open to everyone.
+</Callout>
+
+<AgentContext>
+## Troubleshooting
+
+### The Demo Data page isn't in my Settings menu
+On production deployments Demo Data is visible to internal Carbon staff accounts only; on a local development stack it is open to everyone. Its absence for a regular customer account is expected — same gate as Backups.
+
+### I applied a template and want my old data back
+Use "Revert" on the "Demo data applied" card. Carbon saved a copy of your data immediately before applying, and the card stays open until you choose Keep or Revert — reverting puts back exactly what was there before.
+
+### The apply or revert looks stuck
+It keeps running even if you leave the page. If it's been more than a few minutes, the card shows "This is taking longer than expected" and offers "Retry revert" — safe to click, because the saved copy of your data is kept until the revert succeeds.
+
+### Can't apply a second template
+Only one demo-data change can be open per company. Resolve the pending one first — Keep or Revert on the review card (or Dismiss if it failed).
+
+### Applying failed with an error
+Applying is all-or-nothing: a failure writes no rows and your data is unchanged. The card shows the job's error next to "Failed"; Dismiss clears it, and you can apply again.
+
+### The demo dates look recent — is that real activity?
+Yes, by design: every seeded date is relative to the day the template was applied, so the company always looks live with recent orders and jobs in progress.
+</AgentContext>
diff --git a/docs/content/docs/platform/meta.json b/docs/content/docs/platform/meta.json
index 272befd3e4..c9fb8acb3f 100644
--- a/docs/content/docs/platform/meta.json
+++ b/docs/content/docs/platform/meta.json
@@ -4,6 +4,7 @@
"pages": [
"architecture",
"backups",
+ "demo-data",
"self-hosting",
"single-sign-on",
"licensing"
diff --git a/docs/content/docs/reference/onboarding.mdx b/docs/content/docs/reference/onboarding.mdx
index c58614f4b3..694386c221 100644
--- a/docs/content/docs/reference/onboarding.mdx
+++ b/docs/content/docs/reference/onboarding.mdx
@@ -29,7 +29,7 @@ The steps run in a fixed order (`apps/erp/app/utils/path.ts:2103-2109`):
Two more steps appear conditionally, and only in specific circumstances (`apps/erp/app/routes/onboarding+/_layout.tsx:49-53`):
-- **Industry** — shown only to internal Carbon staff accounts. It offers a demo-data template or a backup restore, so a seeded example company can be stood up. Regular sign-ups never see it.
+- **Industry** — shown only to internal Carbon staff accounts. It offers a [demo-data template](/docs/platform/demo-data) or a [backup](/docs/platform/backups) restore, so a seeded example company can be stood up. Regular sign-ups never see it.
- **Plan** — shown only on Carbon Cloud, the hosted version at [app.carbon.ms](https://app.carbon.ms). It routes you to Stripe checkout to pick a plan before you enter the app. Self-hosted installs skip it entirely and go straight to `/x`.
<Callout type="note" title="The company step does a lot of quiet work">