Contentful logo

Contentful Community

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

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 ‘’ --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

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

Hi @gabriel,
Thank you for your quick response and guidance.

I understand that references wouldn’t be empty if we import the whole space into another, but since the space is having too many content items, importing all of them doesn’t seems the best thing to do in this case. As our aim is to import only a single parent Article along with it’s linked entries.

1 Like

Hi, apologies for resurrecting an old thread but this is exactly our use case: we need to export a single entry with all of its references from the staging environment to the master environment.
Is this still not possible in 2021, or is there a solution available?