Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/content_management/data_migration/exporting_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion docs/content_management/data_migration/importing_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down