Contentful logo

Contentful Community

Exporting a particular Article and it's associated/linked entries (references)

#1

Scenario :
There are two different Contentful space available.
I wish to migrate an ‘Article along with it’s reference entries’ from space A to space B.

Solution attempted :

Have tried exporting the article into a file from space A, by using following command :
contentful space export --content-only --query-entries ‘sys.id=ARTICLE_ID’ --content-file ARTICLE_EXPORT.json

Then Importing the generated file into space B, by using the following command :
contentful space import --content-file ARTICLE_EXPORT.json

Problem with above approach :
After importing the file in space B, the Article gets generated in space B but it’s reference entries are absent.
I believe that this is because the reference entries are not already present on space B.

**Is there a way from which we can export and import the complete Article along with it’s reference entries from space A to space B ? **
Or can we have a bulk export and import for all our related entries at one go?

Any Inputs will be highly appreciated.
Thanks. :slight_smile:

1 Like

#2

Hi @vikrammaurya3339,

It wouldn’t be possible for you to import the entire chunk of linked entries right from your parent item. However, throughout your importing process, it should give you in the end all linked items and so the references wouldn’t be empty as long as you imported the whole space.

1 Like