Skip to content

docs: add guide for migrating a team to another OCS instance#539

Draft
SmittieC wants to merge 1 commit into
mainfrom
cs/export_docs
Draft

docs: add guide for migrating a team to another OCS instance#539
SmittieC wants to merge 1 commit into
mainfrom
cs/export_docs

Conversation

@SmittieC

@SmittieC SmittieC commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a step-by-step how-to guide for migrating a team from one OCS instance to another (e.g. from the hosted www.openchatstudio.com to a self-hosted target), aimed at team admins / self-hosting operators.

The guide covers, in order:

  1. Setting up the target server (with a version/migration-state match warning)
  2. Exporting the team's files via the Data Export section and uploading them to the target's storage backend (preserving storage keys)
  3. Generating an RSA key pair (openssl + Python) and registering the public key on the source
  4. Creating a source-server API key
  5. Enabling migration mode
  6. Running the sync_team management command (source-run and Docker variants)
  7. Re-registering channel webhooks via reregister_webhooks (auto + manual channels)
  8. Verifying channels and doing a final delta sync

It ends with a prominent warning to leave migration mode enabled on the source until the team is deleted there, plus "what is / isn't migrated" summaries and a troubleshooting section.

Added to the nav in mkdocs.yml under Tech Hub → OCS API, after API Access.

Verification

  • uv run zensical build --clean --strict passes with no issues.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread mkdocs.yml
- api/index.md
- api/getting_started_with_oauth.md
- API Access: tech-hub/api_access.md
- Migrate a Team to Another Instance: tech-hub/migrate_team.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is at 4-space indent, which makes it a sibling of OCS API: — i.e. a new top-level Tech Hub page, not a child under "OCS API" after "API Access" (children sit at 6 spaces). The PR description says it was added "under Tech Hub → OCS API, after API Access," which contradicts this placement.

Top-level placement is arguably the better fit (this isn't really an "OCS API" topic), so this may just be a stale description — but please confirm the intent and either fix the description or nest it under OCS API:.

@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Docs review — migrate_team.md

Solid, well-structured first draft. Step ordering, cross-reference anchors, admonition syntax (including the blank line before the bulleted list in the "Effects of migration mode" warning), and the definition-list troubleshooting section all check out. Both key-generation snippets are correct and produce interchangeable RSA-2048 PEMs, and every internal link target resolves. A few items worth addressing before this leaves draft:

Should fix

  • Missing entry in docs/tech-hub/index.md. Every other top-level Tech Hub nav page has a bullet under "What's covered here" (docs/tech-hub/index.md:14-21). Since this page is added at the top level of Tech Hub, it should get a matching bullet, e.g.: **[Migrate a Team to Another Instance](migrate_team.md)** — Move a team's chatbots, configuration, and chat history to another OCS server. Otherwise the guide is undiscoverable from the Tech Hub landing page.
  • Nav placement vs. PR description mismatch — see inline comment on mkdocs.yml.
  • Verify CLI command/flag names against the OCS codebase. The guide documents exact flags (--source-url, --api-key, --team-slug, --private-key-path) and command names (sync_team, reregister_webhooks) as stable API. Please confirm these match the upstream dimagi/open-chat-studio implementation before merge — a wrong flag breaks the whole walkthrough.

Suggestions

  • Downtime & cutover expectations. "Live chat traffic is unaffected" (step 5) is true only before cutover. Step 7 (re-registering webhooks) is the real cutover and can cause a brief per-channel gap while updates propagate — worth a sentence setting expectations.
  • Rollback guidance. No note on aborting mid-migration or recovering after a bad cutover. Since the source stays live until step 7, a couple of sentences on "what to do if the target is broken after re-pointing webhooks" would help.
  • Stronger verification in step 8. Consider suggesting a concrete integrity check (e.g. comparing participant/session counts, or reading the command's summary output) rather than just "confirm chatbots respond."
  • Flag-style consistency. The sync_team example uses --flag "value" while reregister_webhooks uses --team-slug=<team-slug>. Both are valid, but normalizing to one style reads cleaner.
  • Optional cross-link. docs/concepts/team/index.md has no mention of Data Export / migration mode; a pointer from there would improve discoverability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant