Migrate Content Between Stacks Using the CLI
This document guides you through the process of migrating content from one Contentstack stack to another manually.
Prerequisites
- Contentstack account
- Contentstack CLI installed and configured
- CLI authenticated
- Access to both source and target stacks
- An empty target stack
Steps for Execution
To migrate all content from one stack to another quickly, follow the steps below:
- Export from source stack:
csdx cm:stacks:export -k <source_stack_api_key> -d ./export --branch main - Audit the exported content (recommended):
csdx cm:stacks:audit -d ./export/mainNote: The audit process runs automatically during import to validate and fix any issues.
- Import to target stack:
csdx cm:stacks:import -k <target_stack_api_key> -d ./export/main
