Open pjsotou opened 2 months ago
@pjsotou thank you, will take a look to see what can be going on here.
Quick question. Have you tried, adding your own data when running SQL and exporting and reimporting. I wonder if that will work for you.
When I created that export I was using SQLite, maybe there is something that is happening here.
FYI: Also doesnt work with a postgres installation (I am not using the backend - already had strapi installed)
Here is the output from the import:
strapi import -f ../nextjs-corporate-starter/seed-data.tar.gz ? The import will delete your existing data! Are you sure you want to proceed? Yes [2024-04-11 15:29:15.513] warn: (Schema Integrity) plugin::i18n.locale does not exist on destination [2024-04-11 15:29:15.514] warn: (Schema Integrity) plugin::users-permissions.permission does not exist on destination [2024-04-11 15:29:15.515] warn: (Schema Integrity) plugin::users-permissions.role does not exist on destination [2024-04-11 15:29:15.516] warn: (Schema Integrity) plugin::users-permissions.user does not exist on destination [2024-04-11 15:29:15.516] warn: (Schema Integrity) api::article.article does not exist on destination [2024-04-11 15:29:15.517] warn: (Schema Integrity) api::author.author does not exist on destination [2024-04-11 15:29:15.517] warn: (Schema Integrity) api::category.category does not exist on destination [2024-04-11 15:29:15.518] warn: (Schema Integrity) api::global.global does not exist on destination [2024-04-11 15:29:15.518] warn: (Schema Integrity) api::lead-form-submission.lead-form-submission does not exist on destination [2024-04-11 15:29:15.519] warn: (Schema Integrity) api::page.page does not exist on destination [2024-04-11 15:29:15.519] warn: (Schema Integrity) api::product-feature.product-feature does not exist on destination [2024-04-11 15:29:15.520] warn: (Schema Integrity) elements.feature-column does not exist on destination [2024-04-11 15:29:15.520] warn: (Schema Integrity) elements.feature-row does not exist on destination [2024-04-11 15:29:15.521] warn: (Schema Integrity) elements.feature does not exist on destination [2024-04-11 15:29:15.521] warn: (Schema Integrity) elements.footer-section does not exist on destination [2024-04-11 15:29:15.522] warn: (Schema Integrity) elements.logos does not exist on destination [2024-04-11 15:29:15.522] warn: (Schema Integrity) elements.notification-banner does not exist on destination [2024-04-11 15:29:15.523] warn: (Schema Integrity) elements.plan does not exist on destination [2024-04-11 15:29:15.523] warn: (Schema Integrity) elements.testimonial does not exist on destination [2024-04-11 15:29:15.524] warn: (Schema Integrity) layout.footer does not exist on destination [2024-04-11 15:29:15.524] warn: (Schema Integrity) layout.logo does not exist on destination [2024-04-11 15:29:15.525] warn: (Schema Integrity) layout.navbar does not exist on destination [2024-04-11 15:29:15.525] warn: (Schema Integrity) links.button-link does not exist on destination [2024-04-11 15:29:15.525] warn: (Schema Integrity) links.button does not exist on destination [2024-04-11 15:29:15.525] warn: (Schema Integrity) links.link does not exist on destination [2024-04-11 15:29:15.526] warn: (Schema Integrity) links.social-link does not exist on destination [2024-04-11 15:29:15.526] warn: (Schema Integrity) meta.metadata does not exist on destination [2024-04-11 15:29:15.527] warn: (Schema Integrity) sections.bottom-actions does not exist on destination [2024-04-11 15:29:15.527] warn: (Schema Integrity) sections.feature-columns-group does not exist on destination [2024-04-11 15:29:15.527] warn: (Schema Integrity) sections.feature-rows-group does not exist on destination [2024-04-11 15:29:15.527] warn: (Schema Integrity) sections.features does not exist on destination [2024-04-11 15:29:15.528] warn: (Schema Integrity) sections.heading does not exist on destination [2024-04-11 15:29:15.528] warn: (Schema Integrity) sections.hero does not exist on destination [2024-04-11 15:29:15.528] warn: (Schema Integrity) sections.large-video does not exist on destination [2024-04-11 15:29:15.528] warn: (Schema Integrity) sections.lead-form does not exist on destination [2024-04-11 15:29:15.529] warn: (Schema Integrity) sections.pricing does not exist on destination [2024-04-11 15:29:15.529] warn: (Schema Integrity) sections.rich-text does not exist on destination [2024-04-11 15:29:15.529] warn: (Schema Integrity) sections.testimonials-group does not exist on destination [2024-04-11 15:29:15.530] warn: (Schema Integrity) shared.media does not exist on destination [2024-04-11 15:29:15.530] warn: (Schema Integrity) shared.quote does not exist on destination [2024-04-11 15:29:15.530] warn: (Schema Integrity) shared.rich-text does not exist on destination [2024-04-11 15:29:15.530] warn: (Schema Integrity) shared.seo does not exist on destination [2024-04-11 15:29:15.531] warn: (Schema Integrity) shared.slider does not exist on destination [2024-04-11 15:29:15.531] warn: (Schema Integrity) shared.video-embed does not exist on destination ? There are differences in schema between the source and destination, and the data listed above will be lost. Are you sure you want to continue? Yes Starting import... ✔ entities: 21 transfered (size: 19.6 KB) (elapsed: 217 ms) ✔ assets: 70 transfered (size: 23.3 MB) (elapsed: 4722 ms) ✔ links: 0 transfered (size: 0) (elapsed: 0 ms) ✔ configuration: 66 transfered (size: 139.5 KB) (elapsed: 59 ms) ┌────────────────────────┬───────┬───────────────┐ │ Type │ Count │ Size │ ├────────────────────────┼───────┼───────────────┤ │ entities │ 21 │ 19.6 KB │ ├────────────────────────┼───────┼───────────────┤ │ -- plugin::upload.file │ 21 │ ( 19.6 KB) │ ├────────────────────────┼───────┼───────────────┤ │ assets │ 70 │ 23.3 MB │ ├────────────────────────┼───────┼───────────────┤ │ -- .ico │ 1 │ ( 15 KB) │ ├────────────────────────┼───────┼───────────────┤ │ -- .jpg │ 52 │ ( 23 MB) │ ├────────────────────────┼───────┼───────────────┤ │ -- .png │ 13 │ ( 243.6 KB) │ ├────────────────────────┼───────┼───────────────┤ │ -- .svg │ 4 │ ( 17.7 KB) │ ├────────────────────────┼───────┼───────────────┤ │ configuration │ 66 │ 139.5 KB │ ├────────────────────────┼───────┼───────────────┤ │ Total │ 157 │ 23.4 MB │ └────────────────────────┴───────┴───────────────┘
(all I did was create an admin user before running the import)
Just some follow up questions.
In order to have smooth sailing with Data Transfer your schema has to match exactly. Hence you are getting this message.
? There are differences in schema between the source and destination, and the data listed above will be lost. Are you sure you want to continue? Yes
What I would recommend as a way to test. Use your currant Strpai instance.
This way we can see if it is the DTS that is failing or that the backup from my project is not compatible with yours.
Let, me know how it goes. And thank you.
When I try to run the project using a MySQL instance the import doesnt work
yarn strapi import -f ../seed-data.tar.gz
[ERROR] insert into
components_layout_footers_categories_links
(category_id
,category_order
,footer_id
) values (2, 3, 2) - ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (strapi
.components_layout_footers_categories_links
, CONSTRAINTcomponents_layout_footers_categories_links_fk
FOREIGN KEY (footer_id
) REFERENCEScomponents_layout_footers
(id
) ON DEL)Here is my docker file
version: '3.1'
Here is my databse.js
Remember to run in the mysql instance and exec