Skip to content

References

This section consolidates key command-line commands used throughout the migration process and provides instructions for configuring the batch size (Chunk_size) for message queues. It serves as a quick reference for developers executing or customizing the migration from B2B Suite to B2B Commercial.

Command-Line Commands

The following table lists all console commands used in the migration process, along with their purpose and relevant handbook sections.

CommandPurposeReference
bin/console b2b:migrate:commercialStarts the migration process, transferring data from B2B Suite to B2B Commercial.
- --batch-size to set batch size for deletion.
- Arguments: component_name_1 component_name_2 to specify components to migrate.
Running the Migration
bin/console b2b:migrate:validateValidates the migration configuration (XML and configurator classes) for correctness.Configuration Validation
bin/console b2b:migrate:progressDisplays the current migration status.
- Use --watch for real-time updates.
Running the Migration
bin/console b2b:migrate:rollbackReverts the migration, clearing migrated data from target tables while preserving source data.
- -f --force to skip confirmation
- --batch-size to set batch size for deletion.
- Arguments: component_name_1 component_name_2 to specify components to roll back.
Troubleshooting

INFO

Ensure the message queue worker is running before executing migration commands, as described in Prerequisites

Configuring Batch Size (Chunk size)

A batch size is a configuration parameter that determines how many records are processed in a single migration operation. It helps manage memory usage and performance during the migration process, allowing for efficient handling of large datasets.

Current Configuration

The default batch size is set to 100, but it can be adjusted in several ways:

  • By setting the SHOPWARE_B2B_MIGRATION_BATCH_SIZE environment variable in the .env file.
  • By passing the --batch-size option when executing the migration command.

Considerations

  • Smaller Batch Size (e.g., 50):
    • Reduces memory usage and load on the database and queue.
    • Suitable for environments with limited resources or when debugging.
    • Increases total migration time due to more frequent batch processing.
  • Larger Batch Size (e.g., 500):
    • Speeds up migration for large datasets by processing more records per batch.
    • May increase memory and CPU usage, risking timeouts in constrained environments.
  • Testing: Test the new batch size in a staging environment to ensure stability.

WARNING

Changing the batch size without testing may lead to performance issues or timeouts. Always validate the configuration after modifications.