Q1, 2023 — Data Import & Export
complete
Aurélien Georget
If you're currently using another solution to manage your content, you might be interested a lot in this feature. To make it short, it will allow you to import or export data directly from the interface (CSV, JSON).
UPD: the feature is available in v4.6. See more details: https://strp.cc/3jKzeP7
Kevin Vugts
Aurélien Georget I think there a few things missing that are quite an important addition to make this a well worth feature.
The first is avoiding the data removal upon importing data. I think this should be an option to the user since sometimes we don't want specific data to be overridden by the merge. See it like git: resolve merge conflicts using "theirs" or use "mine". So an extra step in the commander CLI would solve this. (would you like your data to be overriden by the transfer?)
This feature is well worth to be added in case of for example an LMS system. Imagine you have a master admin panel for managing multiple instances of an LMS system below it? Using the data transfer feature it's quite nice to be able to sync courses created in the master admin panel with strapi child instances.
However, an LMS system also records the given answers by users, shows reports, tracks the viewed lessons etc.
If we use the current data import/export plugin created by Strapi Team this setup won't work. However, this plugin does cover that: https://market.strapi.io/plugins/strapi-plugin-import-export-entries
Another feature which would be worth for discussion is: Being able to select the collection types you would like to transfer to the other instances. This feature is also already built by strapi-plugin-import-export-entries.
Currently, I don't see the use case other than migrations from dev -> staging -> production to use the built-in datatransfer solution created by you guys.
Please let me know your guys thought on this. I would be very interested in a roadmap, if any, what comes next for the native import/export tool. Perhabs native support for calling the transfer/import/export commands from code instead from CLI?
Best Regards,
KiwiCoder
Kai Doe
Kevin Vugts: Hi Kevin, thanks for sharing your feedback.
You're actually touching points of which we're already quite aware, and that are on our roadmap as enhancements of the data export/import/transfer.
First, regarding the data removal upon importing or transferring data, currently, we don't have a way to identify the content entries uniquely, and this obliges us to provide a restore before importing data because otherwise, you would get duplicates on duplicates each time you import your data. One of the improvements in Strapi v5 will be to identify the content entries uniquely; with this enhancement in place, we'll be able to provide strategies alternative to the data restore.
Regarding the "partial import" (selecting only specific content types), we could provide it before v5 and before the merge strategies. But we have the feeling that without the possibility of merging the data, this enhancement will have little value. What are your thoughts about this point?
So, summarizing and taking a look at the roadmap of enhancements on the data export/import/transfer, right now, we're focused on stabilizing the feature and making the process more reliable (we still have some cases where the data import or transfer is not successful enough). Meanwhile, the development of Strapi v5 is already moving its first steps, and with that will come the possibility of implementing merging strategies. I think that in the first semester of the next year, this important enhancement could find the light.
Kai Doe
Kevin Vugts: Oh, and regarding the possibility of calling the transfer/import/export from code, it's something possible :)
We documented it for now only in the contributor documentation https://contributor.strapi.io/docs/core/data-transfer/engine , again, working to make the feature more reliable to make this information available also in the developer documentation
Please, let me know your feedback if you'll test it!
Kevin Vugts
Kai Doe: Hey Kai,
First of all, thanks for your quick reply and thoughts on this.
To get back to your question related to the removal upon importing and the Partial Import feature:
As stated in my query the plugin https://market.strapi.io/plugins/strapi-plugin-import-export-entries already does this quite smart by providing us an API that allow us to define a so called "idField". This way we are able to uniquely identify an entity.
Citated from the plugin docs:
"Specifying idField Per Collection
Importing data will either create entries if they don't exist, or update them otherwise.
When transfering data from a database to another, relying on the id of an entry is not reliable. For example, if you are transfering data on hospitals with this schema:"
What do you think about that?
Kevin Vugts
Kai Doe: cheers man!
Luis
I opened a new feature request for a way to export and import from the web UI.
Luis
Will there actually be export and import buttons in the web interface in future updates? I currently have Strapi deployed in Railway and can't reach the project directory from the terminal.
Tom
It's not very useful. The table "files_folder_links" is empty, files folder_path are pointing to wrong entry in upload_folders etc. I guess main issue is, that you do not delete/reset sequences so the IDs are increasing all the time instead of being reset (what I don't understand, as you anyway truncate most tables). Hope that next versions are more useful and stable. Currently doing database import/export manual, what is more safe.
Gregor Sondermeier
On the documentation (https://docs.strapi.io/developer-docs/latest/developer-resources/data-management.html#export-data-using-the-cli-tool) I can see that admin users and admin tokens are not exported. That's very good because they are instance-specific (as you elaborated in the last community call.
Question:
Are content-api users (from the users-permissions plugin) also not exported, or can the export feature be configured in a way to not export the content-api users?
Derrick Mehaffy
complete
First version released in v4.6.0: https://strp.cc/3jKzeP7
additional feature additions are planned for v4.7.0 and v4.8.0
d
da_kicks_87
Derrick Mehaffy: Is the CSV content entries import/export to be release in Q1?
Derrick Mehaffy
da_kicks_87: No this is our DEITS feature, you can find a summary of the scope and how it works in this example repo I created: https://github.com/derrickmehaffy/strapi-demo-v4-DEITS
d
da_kicks_87
Derrick Mehaffy: The OP above mentions CSV. That's why I asked. I was looking forward to that.
Derrick Mehaffy
da_kicks_87: While we haven't built that in, DEITS is built on a provider system so it would be possible for users to build a "source" or "destination" provider for CSV. We opted to build the feature using jsonl (json lines)
Shaun Brown
The first beta release for the data export data import feature is out. You can see the Forum post for more information: https://forum.strapi.io/t/data-import-export/24443/16
A
Alban
Are we going to be able to export components/content-types structures? It seems this is not exposed in the API. Or is there a workaround? I am trying to backup this information with exports.
R
Regan Johnson
Currently using Strapi V4 self-hosted, and want to import data to Strapi Cloud (Beta) - does the work being done on this tool cover that use case also?
Load More
→