Clone production space into development space


I have two spaces for my Contentful application:

  1. For Production (User facing)
  2. For development

I have been not been following the pattern of pushing changes to my development space first, testing and then pushing to my production space. Instead I’ve just been using my production space and haven’t touched the dev space in sometime. I now have a very big difference with whats in my Production space and whats in my Development space.

Recently I tried syncing the two using the [Contentful CLI] I used the following command to export my prod data into a JSON file:

contentful space export --space-id <spaceID> --include-drafts true

I then used the JSON file to import it into my development space:

contentful space import --content-file <jsonFile> --space-id <spaceID>

However, after execution I get some of the following errors:

  1. “status”: 400,
    “statusText”: “Bad Request”,
    “message”: “Already archived”,

  2. “status”: 409,
    “statusText”: “Conflict”,
    “message”: “”,

  3. “name”: “AssetProcessingTimeout”,
    “message”: “Asset is taking longer then expected to process.”,

  4. “status”: 422,
    “statusText”: “Unprocessable Entity”,
    “message”: “Validation error”,

I mostly have conflict errors, I also tried creating a new space and tried importing my JSON file into there to avoid the conflict errors. This however, made no difference.

TLDR : What is the recommended way to duplicate one space to another space?

Thank you


1 Like