Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Contentful Content Management Token
  4. CMA_TOKEN=''
  5. # Contentful Space ID [Source]
  6. SRC_SPACE_ID=''
  7. # Contentful Environment ID [Source]
  8. SRC_ENV_ID='master'
  9. # Contentful Space ID [Destination]
  10. DST_SPACE_ID='qd6m4t8o27bb'
  11. # Contentful Environment ID [Destination]
  12. DST_ENV_ID='master'
  13. # Name of file that will store all exported data
  14. EXPORT_FILENAME='contentful_export.json'
  15.  
  16. # Contentful CLI must be present. Install it with the following command:
  17. # npm install -g contentful-cli
  18.  
  19. contentful login --management-token $CMA_TOKEN
  20.  
  21. contentful space use --space-id $SRC_SPACE_ID --environment-id $SRC_ENV_ID
  22.  
  23. contentful space export --content-file $EXPORT_FILENAME
  24.  
  25. contentful space use --space-id $DST_SPACE_ID --environment-id $DST_ENV_ID
  26.  
  27. contentful space import --content-file $EXPORT_FILENAME
  28.  
  29. rm -rf $EXPORT_FILENAME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement