We have multiple separate stores (I use docker) running on the same instance of MSSQL server. When performing a backup, the database name is prefixed with 'database_'. When loading these backup files, we also load based on that prefix.
Code here
The issue is, with Docker, we can only mount one folder into the container to synchronize these backup files. This means all stores load all backup files from other stores, and we also cannot differentiate which backup is intended for which store, which I believe is very risky.
I think a possible solution could be: to set the backup filename with the prefix being the name of the database in the connection string or based on DataConnection as you have done. And when displaying the list of backup files, we should only show files with prefixes matching the database name of that store.
Today, deployment with Docker is very common, and I think we should consider addressing this issue.
Thanks a lot for the suggestion. But this feature is quite specific. And after some consideration we've decided not to implement this functionality out of the box and leave it for customization
nopCommerce version: 4.7 (latest from develop)
Steps to reproduce the problem:
We have multiple separate stores (I use docker) running on the same instance of MSSQL server. When performing a backup, the database name is prefixed with 'database_'. When loading these backup files, we also load based on that prefix. Code here
The issue is, with Docker, we can only mount one folder into the container to synchronize these backup files. This means all stores load all backup files from other stores, and we also cannot differentiate which backup is intended for which store, which I believe is very risky.
I think a possible solution could be: to set the backup filename with the prefix being the name of the database in the connection string or based on DataConnection as you have done. And when displaying the list of backup files, we should only show files with prefixes matching the database name of that store.
Today, deployment with Docker is very common, and I think we should consider addressing this issue.