diff --git a/docs/content_management/data_migration/exporting_data.md b/docs/content_management/data_migration/exporting_data.md index 24f348be0c..6bf9fd024d 100644 --- a/docs/content_management/data_migration/exporting_data.md +++ b/docs/content_management/data_migration/exporting_data.md @@ -14,7 +14,7 @@ or in [a custom folder that you configure](managing_migrations.md#migration-fold You can later use this file to import the data. ``` bash -php bin/console ibexa:migrations:generate --type=content --mode=create +php bin/console ibexa:migrations:generate --type=content --mode=create --siteaccess=admin ``` This generates a file containing all Content items. @@ -134,6 +134,12 @@ Note that you should test your migrations. See [Importing data](importing_data.m Migration command can be executed with database rollback at the end with the `--dry-run` option. +!!! caution + + The `--siteaccess` option usage can be relevant for a multi-language repository. + You must export with a SiteAccess that supports all languages, or the migration skips translations in non-supported languages. + It is recommended to use the SiteAccess from the Back Office of the targeted repository. + ## type The mandatory `--type` option defines the type of Repository data to export. diff --git a/docs/content_management/data_migration/importing_data.md b/docs/content_management/data_migration/importing_data.md index 94a9beeba1..6848d64422 100644 --- a/docs/content_management/data_migration/importing_data.md +++ b/docs/content_management/data_migration/importing_data.md @@ -15,13 +15,17 @@ and specify the file name within this folder as parameter. If you don't specify the file, all files within this directory are used. ``` bash -php bin/console ibexa:migrations:migrate --file=my_data_export.yaml +php bin/console ibexa:migrations:migrate --file=my_data_export.yaml --siteaccess=admin ``` Migrations store execution metadata in the `ibexa_migrations` database table. This allows incremental upgrades: the `ibexa:migrations:migrate` command ignores files that it had previously executed. +Notice that `--siteaccess` option usage is important when several languages are used. +You must import with a SiteAccess that supports all languages, or the migration skips translations in non-supported languages. +It's recommended to use the SiteAccess from the Back Office of the targeted repository. + ## Migration step A data migration step is a single operation in data migration process