I am testing the integration of Redis with Shopware 6.7 and have several questions.
I am using two Redis instances: one for ephemeral data (cache) and one for persistent data.
My settings for persistent data are stored in config/packages/shopware.yaml
My first question is about switching the number_range to Redis, which belongs to the persistent instance. According to the Shopware 6.7 documentation:
Migrating between storages
You can migrate the current state of the number ranges from your current storage to a new one by running the following CLI command:
bin/console number-range:migrate {fromStorage} {toStorage}
For example, if you want to migrate from the default
SQL
storage to the high-performingRedis
storage, the command is:bin/console number-range:migrate SQL Redis
However, when I try to perform this migration after switching to Redis, I get the following error:
php bin/console number-range:migrate SQl Redis
[WARNING] Migrating the number range increments during load may lead to duplicate numbers being generated.
Are you sure you want to continue? (yes/no) [yes]:
yes
In IncrementStorageRegistry.php line 35:
[Shopware\Core\System\NumberRange\Exception\IncrementStorageNotFoundException]
The number range increment storage „SQl“ is not available. Available storages are: „redis“.
This seems to contradict the documentation.
- How should this migration be done correctly? Is it necessary to perform this migration at all?
- During a full project backup, whether for migrating to a development environment or restoring data to the project, we back up the files and perform a MySQL dump.
After integrating Redis, should we also back up the Redis database separately?