In the Console, create a new project and then click the Create main branch button to create the PostgreSQL instance that will hold the production clone.Since this is a non-production setup, you can typically select 0 replicas. It is a good idea to start with a similar
instance size as you use for production, but you can also use a smaller instance size if the production clone traffic will be much smaller. You can adjust the size later.
If you’re using Xata for production, we recommend creating a separate organization for your production clone. This allows you to control access to production data more effectively by only granting production access to team members who need it. Within an organization, roles control who can manage members, billing and API keys, but every member can access all of its projects and branches.
You would typically run xata init command in your application source directory, or in any directory/repository where you’d like to keep the configuration. It will create a .xata folder with several configuration files.Follow the instructions from the prompt to select the project and branch that you created at the previous step. Leave the database name set to xata.
Follow the prompts to specify whether you want anonymization enabled, which tables and columns to anonymize, and which transformers to use. For more details about transformers, see the anonymization page.
To simplify the process, the interactive prompt suggests which columns require anonymization. This is based on simple heuristics (name, email, etc.)
The result is a YAML configuration file written in .xata/clone.yaml. You can edit this file to further configure your anonymization process.
You now have a realistic, anonymized production clone in Xata.
You can safely test schema migrations, new indexes, or any other database changes using instant Copy-on-Write branches.
For more details on how to set up an advanced schema changes workflow, see the schema changes section.To automate this process and keep your production clone up-to-date, see the scheduled clone documentation.
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Xata","colors":{"primary":"#735adc","light":"#735adc","dark":"#735adc"},"logo":{"light":"https://mintcdn.com/xata/rYmGPszzEBdWMgvX/logo/light.svg?fit=max\u0026auto=format\u0026n=rYmGPszzEBdWMgvX\u0026q=85\u0026s=4ef098482078f4153c39dc17dd26476b","dark":"https://mintcdn.com/xata/rYmGPszzEBdWMgvX/logo/dark.svg?fit=max\u0026auto=format\u0026n=rYmGPszzEBdWMgvX\u0026q=85\u0026s=906164890c462dfd9eb1d334f76aa98d"},"favicon":"https://mintcdn.com/xata/rYmGPszzEBdWMgvX/favicon.svg?fit=max\u0026auto=format\u0026n=rYmGPszzEBdWMgvX\u0026q=85\u0026s=d86bc351b43f47f5187c041a7cb5539a","api":{},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://xata.io/contact-support","label":"Support"},{"href":"https://www.xatastatus.com/","label":"Status"},{"href":"https://github.com/xataio","label":"GitHub"}],"primary":{"type":"button","label":"Xata Console","href":"https://console.xata.io/"}},"footer":{"socials":{"x":"https://twitter.com/xata","linkedin":"https://www.linkedin.com/company/xataio","github":"https://github.com/xataio","discord":"https://xata.io/discord","youtube":"https://www.youtube.com/@xataio"}},"fonts":{"family":"Geist"},"icons":{"library":"fontawesome"},"integrations":{"gtm":{"tagId":"GTM-PMD75RM"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"xata","hasAudioNarration":false,"actualSubdomain":"xata","customDomains":["xata.io"],"gitSource":{"type":"github","owner":"xataio","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adb657c57868d74937d85e9","collectionId":"25377e7c-e821-437f-9731-0d10fe376557","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adb657c57868d74937d85e9"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae86fa87c0b87e9ec2c56f4","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Guides","count":60},{"language":"default","tag":"API Reference","count":51},{"language":"default","tag":"Endpoints","count":51},{"language":"default","tag":"Open Source","count":34},{"language":"default","tag":"pgstream","count":34},{"language":"default","tag":"Organizations","count":22},{"language":"default","tag":"CLI Reference","count":19},{"language":"default","tag":"Manage","count":17},{"language":"default","tag":"Release Notes","count":15},{"language":"default","tag":"AI Agents","count":10}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@xata.io"}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#navigation-items li[id=\"/overview\"]>button[aria-controls]>div:last-child{display:none}"}],"page":{"pagePath":"tutorials/create-production-clone","slug":"/tutorials/create-production-clone","pageMetadata":{"title":"Create a production clone","description":"Use Xata's clone and branching features to create a safe, anonymized production clone.","icon":"copy","href":"/tutorials/create-production-clone"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use Xata’s clone and branching features to create a safe, anonymized production clone.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This guide shows you how to create a realistic production clone in Xata by cloning your production database, optionally anonymizing sensitive data.`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/xata/zunLvnbMMVhTIsZq/images/deployment-models/xata-deployment-staging.png?fit=max\u0026auto=format\u0026n=zunLvnbMMVhTIsZq\u0026q=85\u0026s=19ef06a16fb3d83a6d6bff838395b5b1`,alt:`Creating a production clone of your database`,className:`mint-rounded-lg`,\"data-og-width\":`1084`,width:`1084`,\"data-og-height\":`1270`,height:`1270`,\"data-path\":`images/deployment-models/xata-deployment-staging.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/xata/zunLvnbMMVhTIsZq/images/deployment-models/xata-deployment-staging.png?w=280\u0026fit=max\u0026auto=format\u0026n=zunLvnbMMVhTIsZq\u0026q=85\u0026s=1488ccabf4baacc47caa9e934f769fd0 280w, https://mintcdn.com/xata/zunLvnbMMVhTIsZq/images/deployment-models/xata-deployment-staging.png?w=560\u0026fit=max\u0026auto=format\u0026n=zunLvnbMMVhTIsZq\u0026q=85\u0026s=102c8cf96bdd5791314fb86734c1f8d9 560w, https://mintcdn.com/xata/zunLvnbMMVhTIsZq/images/deployment-models/xata-deployment-staging.png?w=840\u0026fit=max\u0026auto=format\u0026n=zunLvnbMMVhTIsZq\u0026q=85\u0026s=422dcbf1cc63d58ee1c453bbd37d651d 840w, https://mintcdn.com/xata/zunLvnbMMVhTIsZq/images/deployment-models/xata-deployment-staging.png?w=1100\u0026fit=max\u0026auto=format\u0026n=zunLvnbMMVhTIsZq\u0026q=85\u0026s=a723099594f49572f6fd7f9c314cc9ff 1100w, https://mintcdn.com/xata/zunLvnbMMVhTIsZq/images/deployment-models/xata-deployment-staging.png?w=1650\u0026fit=max\u0026auto=format\u0026n=zunLvnbMMVhTIsZq\u0026q=85\u0026s=659996995b99499737c4f84be034c759 1650w, https://mintcdn.com/xata/zunLvnbMMVhTIsZq/images/deployment-models/xata-deployment-staging.png?w=2500\u0026fit=max\u0026auto=format\u0026n=zunLvnbMMVhTIsZq\u0026q=85\u0026s=9c985722bd792264ea7232d21a1e0ba2 2500w`}),`\n`,_jsx(Heading,{level:`2`,id:`1-prerequisites`,children:`1. Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A Xata account (`,_jsx(_components.a,{href:`https://console.xata.io`,children:`sign up here`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.a,{href:`/cli`,children:`Xata CLI`}),` installed:`,`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -fsSL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://xata.io/install.sh`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` bash`})]}),`\n`]})})}),`\n`]}),`\n`,_jsx(_components.li,{children:`Access to your production PostgreSQL database`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`2-create-a-xata-project-and-branch`,children:`2. Create a Xata project and branch`}),`\n`,_jsxs(_components.p,{children:[`In the Console, create a new project and then click the `,_jsx(_components.strong,{children:`Create main branch`}),` button to create the PostgreSQL instance that will hold the production clone.`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/xata/PDDxPY9xptrEGBCP/images/create-new-branch.png?fit=max\u0026auto=format\u0026n=PDDxPY9xptrEGBCP\u0026q=85\u0026s=cbb47662022af582812118fea4057b47`,alt:`Create new branch`,className:`mint-rounded-lg`,\"data-og-width\":`3010`,width:`3010`,\"data-og-height\":`2050`,height:`2050`,\"data-path\":`images/create-new-branch.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/xata/PDDxPY9xptrEGBCP/images/create-new-branch.png?w=280\u0026fit=max\u0026auto=format\u0026n=PDDxPY9xptrEGBCP\u0026q=85\u0026s=12c0256e7fd5af1dc607175418afac09 280w, https://mintcdn.com/xata/PDDxPY9xptrEGBCP/images/create-new-branch.png?w=560\u0026fit=max\u0026auto=format\u0026n=PDDxPY9xptrEGBCP\u0026q=85\u0026s=09c1adf37fc4f212f938aa4503f4a052 560w, https://mintcdn.com/xata/PDDxPY9xptrEGBCP/images/create-new-branch.png?w=840\u0026fit=max\u0026auto=format\u0026n=PDDxPY9xptrEGBCP\u0026q=85\u0026s=cccacf327071189131802dd4d4b50b52 840w, https://mintcdn.com/xata/PDDxPY9xptrEGBCP/images/create-new-branch.png?w=1100\u0026fit=max\u0026auto=format\u0026n=PDDxPY9xptrEGBCP\u0026q=85\u0026s=0f0b26a1c8137746c8c0ab1ec60764aa 1100w, https://mintcdn.com/xata/PDDxPY9xptrEGBCP/images/create-new-branch.png?w=1650\u0026fit=max\u0026auto=format\u0026n=PDDxPY9xptrEGBCP\u0026q=85\u0026s=e51aea836d21a6ba484ca328f3ca61c8 1650w, https://mintcdn.com/xata/PDDxPY9xptrEGBCP/images/create-new-branch.png?w=2500\u0026fit=max\u0026auto=format\u0026n=PDDxPY9xptrEGBCP\u0026q=85\u0026s=7c17af3789933f159bce808e0e322fe5 2500w`}),`\n`,_jsx(_components.p,{children:`Since this is a non-production setup, you can typically select 0 replicas. It is a good idea to start with a similar\ninstance size as you use for production, but you can also use a smaller instance size if the production clone traffic will be much smaller. You can adjust the size later.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If you’re using Xata for production, we recommend creating a separate organization for your production clone. This allows you to control access to production data more effectively by only granting production access to team members who need it. Within an organization, `,_jsx(_components.a,{href:`/platform/organization-roles`,children:`roles`}),` control who can manage members, billing and API keys, but every member can access all of its projects and branches.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`3-configure-the-xata-cli`,children:`3. Configure the Xata CLI`}),`\n`,_jsx(_components.p,{children:`Authenticate the CLI by running:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` auth`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` login`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Initialize the project by running:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` init`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You would typically run `,_jsx(_components.code,{children:`xata init`}),` command in your application source directory, or in any directory/repository where you’d like to keep the configuration. It will create a `,_jsx(_components.code,{children:`.xata`}),` folder with several configuration files.`]}),`\n`,_jsxs(_components.p,{children:[`Follow the instructions from the prompt to select the project and branch that you created at the previous step. Leave the database name set to `,_jsx(_components.code,{children:`xata`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`4-get-the-connection-string-of-your-current-provider`,children:`4. Get the connection string of your current provider`}),`\n`,_jsx(_components.p,{children:`This step depends on your Postgres provider, but keep the following recommendations in mind:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`If your provider offers a read-only endpoint, it is recommended to use that one in order to avoid extra load to your primary instance.`}),`\n`,_jsxs(_components.li,{children:[`If your provider offers a “pooler” or “pgbouncer” endpoint, avoid that one, because `,_jsx(_components.code,{children:`xata clone`}),` uses a long running transaction.`]}),`\n`,_jsxs(_components.li,{children:[`The Postgres connection string generally has the form `,_jsx(_components.code,{children:`postgres://user:pass@host:5432/dbname`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`5-configure-cloning`,children:`5. Configure cloning`}),`\n`,_jsx(_components.p,{children:`First, generate a configuration for the Xata clone process:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` clone`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` config`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --source-url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $CONN_STRING`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --mode=prompt`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Where the `,_jsx(_components.code,{children:`CONN_STRING`}),` variable is set to the production connection string from the previous step.`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`if your Postgres hosting provider uses self-signed certificates, you can disable the strict certificate verification like this:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NODE_TLS_REJECT_UNAUTHORIZED`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`0`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` clone`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` config`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --source-url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $CONN_STRING`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --mode=prompt`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Follow the prompts to specify whether you want anonymization enabled, which tables and columns to anonymize, and which transformers to use. For more details about transformers, see the `,_jsx(_components.a,{href:`/core-concepts/anonymization`,children:`anonymization`}),` page.`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`To simplify the process, the interactive prompt suggests which columns require anonymization. This is based on simple heuristics (name, email, etc.)`})}),`\n`,_jsxs(_components.p,{children:[`The result is a YAML configuration file written in `,_jsx(_components.code,{children:`.xata/clone.yaml`}),`. You can edit this file to further configure your anonymization process.`]}),`\n`,_jsx(Heading,{level:`3`,id:`6-start-the-clone`,children:`6. Start the clone`}),`\n`,_jsx(_components.p,{children:`Now, run the clone command to snapshot your production database into Xata:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` clone`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` start`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --source-url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $CONN_STRING`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The clone process will copy data and apply your anonymization rules to the current production clone branch.`}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`7-create-a-branch-from-the-production-clone`,children:`7. Create a branch from the production clone`}),`\n`,_jsx(_components.p,{children:`Now, list your branches to get the production clone branch ID:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` branch`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Grab the production clone branch ID from the list and create a new `,_jsx(_components.code,{children:`dev`}),` branch from it:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` branch`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dev`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --parent-branch`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`production-clone-branch-i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`d`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Wait for the branch to become ready:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` branch`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` wait-ready`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Connect to the newly created dev branch:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`psql`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `\"}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" branch url`\"})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`summary`,children:`Summary`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You now have a realistic, anonymized production clone in Xata.`}),`\n`,_jsx(_components.li,{children:`You can safely test schema migrations, new indexes, or any other database changes using instant Copy-on-Write branches.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`For more details on how to set up an advanced schema changes workflow, see the `,_jsx(_components.a,{href:`/core-concepts/schema-changes`,children:`schema changes`}),` section.`]}),`\n`,_jsxs(_components.p,{children:[`To automate this process and keep your production clone up-to-date, see the `,_jsx(_components.a,{href:`/automations/kubernetes-clone`,children:`scheduled clone`}),` documentation.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a production clone","description":"Use Xata's clone and branching features to create a safe, anonymized production clone.","icon":"copy","href":"/tutorials/create-production-clone"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Prerequisites","slug":"1-prerequisites","depth":2,"children":[]},{"title":"2. Create a Xata project and branch","slug":"2-create-a-xata-project-and-branch","depth":2,"children":[]},{"title":"3. Configure the Xata CLI","slug":"3-configure-the-xata-cli","depth":2,"children":[]},{"title":"4. Get the connection string of your current provider","slug":"4-get-the-connection-string-of-your-current-provider","depth":2,"children":[]},{"title":"5. Configure cloning","slug":"5-configure-cloning","depth":2,"children":[{"title":"6. Start the clone","slug":"6-start-the-clone","depth":3,"children":[]}]},{"title":"7. Create a branch from the production clone","slug":"7-create-a-branch-from-the-production-clone","depth":2,"children":[]},{"title":"Summary","slug":"summary","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/xata/42338cddc6e87248/tracking.js"],"dynamicCss":".mint-rounded-lg {\n border-radius: 0.5rem\n}","subdomain":"xata","siteName":"Xata","title":"Create a production clone - Xata","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-29T09:21:15.858Z","originalFileLocation":"tutorials/create-production-clone.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use Xata\u0026#x27;s clone and branching features to create a safe, anonymized production clone.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Xata\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a production clone - Xata\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use Xata\u0026#x27;s clone and branching features to create a safe, anonymized production clone.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Xata\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://xata.io/docs/tutorials/create-production-clone\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://xata.mintlify.app/_mintlify/api/og/v2?division=Branching+Workflows\u0026amp;title=Create+a+production+clone\u0026amp;description=Use+Xata%27s+clone+and+branching+features+to+create+a+safe%2C+anonymized+production+clone.\u0026amp;theme=a98dfbe8d11c1328e16cdb2b\u0026amp;signature=91ededd9afd35f4e28ac30fb50b7a5ecdc1094426dd8b0853754ba1c532217f9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a production clone - Xata\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use Xata\u0026#x27;s clone and branching features to create a safe, anonymized production clone.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://xata.mintlify.app/_mintlify/api/og/v2?division=Branching+Workflows\u0026amp;title=Create+a+production+clone\u0026amp;description=Use+Xata%27s+clone+and+branching+features+to+create+a+safe%2C+anonymized+production+clone.\u0026amp;theme=a98dfbe8d11c1328e16cdb2b\u0026amp;signature=91ededd9afd35f4e28ac30fb50b7a5ecdc1094426dd8b0853754ba1c532217f9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Xata\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#735adc\">\u003clink data-mint-head rel=\"canonical\" href=\"https://xata.io/docs/tutorials/create-production-clone\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/tutorials/create-production-clone.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://xata.io/#organization\",\"name\":\"Xata\",\"url\":\"https://xata.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/xata/rYmGPszzEBdWMgvX/logo/light.svg?fit=max\u0026auto=format\u0026n=rYmGPszzEBdWMgvX\u0026q=85\u0026s=4ef098482078f4153c39dc17dd26476b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://xata.io/docs#website\",\"name\":\"Xata\",\"url\":\"https://xata.io/docs\",\"publisher\":{\"@id\":\"https://xata.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://xata.io/docs/tutorials/create-production-clone#webpage\",\"url\":\"https://xata.io/docs/tutorials/create-production-clone\",\"name\":\"Create a production clone\",\"description\":\"Use Xata's clone and branching features to create a safe, anonymized production clone.\",\"dateModified\":\"2026-09-29T09:21:15.858Z\",\"isPartOf\":{\"@id\":\"https://xata.io/docs#website\"},\"breadcrumb\":{\"@id\":\"https://xata.io/docs/tutorials/create-production-clone#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://xata.io/docs/tutorials/create-production-clone#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Branching Workflows\",\"item\":\"https://xata.io/docs/automations/ga-pr\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a production clone\",\"item\":\"https://xata.io/docs/tutorials/create-production-clone\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://xata.io/docs/tutorials/create-production-clone#article\",\"headline\":\"Create a production clone\",\"name\":\"Create a production clone\",\"description\":\"Use Xata's clone and branching features to create a safe, anonymized production clone.\",\"url\":\"https://xata.io/docs/tutorials/create-production-clone\",\"mainEntityOfPage\":{\"@id\":\"https://xata.io/docs/tutorials/create-production-clone#webpage\"},\"dateModified\":\"2026-09-29T09:21:15.858Z\",\"publisher\":{\"@id\":\"https://xata.io/#organization\"},\"isPartOf\":{\"@id\":\"https://xata.io/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Xata\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Xata","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book-open","directory":"card","groups":[{"group":"Introduction","icon":"sparkles","root":{"title":"Xata Documentation","icon":"book","sidebarTitle":"Overview","mode":"frame","href":"/overview"},"pages":[]},{"group":"Get Started","icon":"rocket","pages":[{"title":"Quickstart","icon":"rocket","href":"/quickstart"}]},{"group":"Core Concepts","icon":"layer-group","pages":[{"title":"Branching","icon":"code-branch","iconType":"regular","href":"/core-concepts/branching"},{"title":"Data Anonymization","icon":"user-secret","href":"/core-concepts/anonymization"},{"title":"Schema Changes","icon":"database","href":"/core-concepts/schema-changes"},{"title":"Scale to Zero","icon":"pause","href":"/core-concepts/scale-to-zero"},{"title":"Serverless Proxy","icon":"bolt","href":"/core-concepts/serverless-proxy"},{"title":"Deployment Models","icon":"cloud","href":"/core-concepts/deployment"}]},{"group":"Branching Workflows","icon":"code-branch","pages":[{"title":"Create Branch","description":"GitHub Actions workflow for creating and managing development branches for pull requests","icon":"github","href":"/automations/ga-pr"},{"title":"Create a production clone","icon":"copy","href":"/tutorials/create-production-clone"},{"title":"Data Anonymization","description":"Sensitive data anonymization and masking for PostgreSQL","icon":"user-secret","href":"/core-concepts/anonymization"},{"title":"Create Streaming Replica","icon":"right-left","href":"/tutorials/streaming-replication"},{"title":"Make Schema Changes","icon":"code-merge","href":"/tutorials/schema-change"},{"title":"Find and fix slow queries on a Xata branch","icon":"gauge-high","href":"/tutorials/find-slow-queries"}]},{"group":"Connect","icon":"plug","pages":[{"group":"ORMs","icon":"database","expanded":false,"pages":[{"title":"Use Xata with Drizzle","icon":"droplet","href":"/quickstarts/drizzle"}]},{"group":"Platforms","icon":"cloud","expanded":false,"pages":[{"title":"Use Xata with Netlify","icon":"cloud-arrow-up","href":"/quickstarts/netlify"},{"title":"Use Xata with Railway","icon":"train","href":"/quickstarts/railway"}]},{"group":"Tools","icon":"diagram-project","expanded":false,"pages":[{"title":"Use Xata with n8n","icon":"diagram-project","href":"/quickstarts/n8n"}]}]},{"group":"Manage","icon":"sliders","pages":[{"title":"Account Management","icon":"circle-user","href":"/platform/account"},{"title":"Organizations","icon":"users","href":"/platform/organization"},{"title":"Organization roles","icon":"user-shield","href":"/platform/organization-roles"},{"title":"API Keys","icon":"key","href":"/platform/api-key"},{"title":"MCP Server","icon":"plug","href":"/platform/mcp"},{"title":"Projects","icon":"folder","href":"/platform/project"},{"title":"Branches","icon":"code-branch","href":"/platform/branch"},{"title":"Compute","icon":"microchip","href":"/platform/compute"},{"title":"Schemas","icon":"sitemap","href":"/platform/schemas"},{"title":"Migrations","icon":"code-merge","href":"/platform/migrations"},{"title":"SQL Editor","icon":"magnifying-glass","href":"/platform/sql-editor"},{"title":"Query insights","icon":"chart-simple","href":"/platform/query-insights"},{"title":"Metrics","icon":"chart-line","href":"/platform/metrics"},{"title":"Extensions","icon":"puzzle-piece","href":"/platform/extensions"},{"title":"Logs","icon":"file-lines","href":"/platform/logs"},{"title":"AWS PrivateLink","icon":"lock","href":"/platform/privatelink"},{"title":"Single sign-on","icon":"shield-halved","href":"/platform/sso"}]},{"group":"Import and Migrate","icon":"database","pages":[{"title":"Overview","icon":"list","href":"/migrations/overview"},{"title":"AWS RDS","icon":"aws","href":"/migrations/aws-rds"},{"title":"AWS Aurora","icon":"aws","href":"/migrations/aws-aurora"},{"title":"GCP Cloud SQL","icon":"google","href":"/migrations/gcp-cloudsql"},{"title":"Azure Database","icon":"microsoft","href":"/migrations/azure"},{"title":"Self-Hosted PostgreSQL","icon":"database","href":"/migrations/self-hosted"},{"title":"Greenmask (subsets)","icon":"scissors","href":"/migrations/greenmask"},{"title":"Neon","icon":"server","href":"/migrations/neon"},{"title":"Supabase","icon":"bolt","href":"/migrations/supabase"},{"title":"Parquet files","icon":"file","href":"/migrations/parquet"}]},{"group":"Workflows","icon":"gears","pages":[{"title":"GitHub App","icon":"github","href":"/automations/github-app"},{"title":"Vercel preview deployments","icon":"cloud-arrow-up","href":"/automations/vercel-github-app"},{"title":"Create Branch","icon":"github","href":"/automations/ga-pr"},{"title":"Scheduled Clone","icon":"github","href":"/automations/ga-clone"},{"title":"Merge Readiness","icon":"github","href":"/automations/ga-check"},{"title":"Scheduled Clone","icon":"calendar","href":"/automations/kubernetes-clone"},{"title":"Bulk Delete Branches","icon":"github","href":"/automations/ga-cleanup"}]},{"group":"AI Agents","icon":"robot","root":{"title":"Xata for Agents","icon":"robot","href":"/ai-agents/overview"},"pages":[{"title":"Agent onboarding","icon":"wand-magic-sparkles","href":"/ai-agents/onboarding"},{"title":"Agent Skills","icon":"star","href":"/ai-agents/agent-skills"},{"title":"Claude Code","icon":"terminal","href":"/ai-agents/claude-code"},{"title":"Codex","icon":"code","href":"/ai-agents/codex"},{"title":"Cursor","icon":"arrow-pointer","href":"/ai-agents/cursor"},{"title":"OpenCode","icon":"terminal","href":"/ai-agents/opencode"},{"title":"GitHub Copilot","icon":"github","href":"/ai-agents/github-copilot"},{"title":"Windsurf","icon":"wind","href":"/ai-agents/windsurf"},{"title":"Cline","icon":"check-double","href":"/ai-agents/cline"},{"title":"Devin","icon":"cloud","href":"/ai-agents/devin"}]},{"group":"Reference","icon":"book","pages":[{"title":"Changelog","icon":"ship","href":"/changelog"}]}]},{"tab":"API Reference","icon":"terminal","pages":[{"title":"API Reference","href":"/api-reference/organizations/get-list-of-organizations"}]},{"tab":"CLI Reference","icon":"square-terminal","pages":[{"title":"CLI Reference","href":"/cli"}]},{"tab":"Open Source","icon":"code-branch","menu":[{"item":"pgstream","icon":"right-left","description":"Postgres replication with schema-aware streaming.","pages":[{"title":"pgstream","href":"/opensource/pgstream/overview"}]}],"pages":[{"title":"Open Source","href":"/opensource/pgstream/overview"}]}]},"basePath":"","title":"Create a production clone - Xata","buildId":"dpl_6cCEiK8XNNvaLBBkWzcBhdE9QfLC","deploymentId":"dpl_6cCEiK8XNNvaLBBkWzcBhdE9QfLC","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-B-WKhCOL.js","lightbox-handle-r17bVUz3.js"]}