Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Contentful Content Management Token
- CMA_TOKEN=''
- # Contentful Space ID [Source]
- SRC_SPACE_ID=''
- # Contentful Environment ID [Source]
- SRC_ENV_ID='master'
- # Contentful Space ID [Destination]
- DST_SPACE_ID='qd6m4t8o27bb'
- # Contentful Environment ID [Destination]
- DST_ENV_ID='master'
- # Name of file that will store all exported data
- EXPORT_FILENAME='contentful_export.json'
- # Contentful CLI must be present. Install it with the following command:
- # npm install -g contentful-cli
- contentful login --management-token $CMA_TOKEN
- contentful space use --space-id $SRC_SPACE_ID --environment-id $SRC_ENV_ID
- contentful space export --content-file $EXPORT_FILENAME
- contentful space use --space-id $DST_SPACE_ID --environment-id $DST_ENV_ID
- contentful space import --content-file $EXPORT_FILENAME
- rm -rf $EXPORT_FILENAME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement