Sometimes there is a need to load multiple backups at once for multiple environments. In most cases this reload happens agains backups that are compatible with given environment.
Currently, if we want to do this, we have to call backup command in a loop, passing there all of environments that we want to impact.
Proposal
We can have a command that will load backups for given environments that matches some pattern within its name/domain, where these backups are loaded accordingly to its compatibility. Examples below:
Command that loads backup name snapshot-automation-tests in version 3.15 for envs that match pattern staging.*:
Note: considering this example, when we have env with on version 3.15 it seeks for snapshot-automation-tests in 3.15, if it's not present, it takes 3.14, and so on.
Command that loads backup name snapshot-automation-tests in version 3.15 for specific env:
Note: Assuming that test1 i on 3.14 it will take snapshot-automation-tests in version 3.14 first.
User prompt / CI
We have to also consider two options of executing it.
Default one when the user is calling this command by hand - in this case we have to present the user what envs will be affected and what backups in which version (each) will be used. (eg. table with columns: env - backup - version)
Second one, dedicated for the CI that just skips the prompt with confirmation and table that includes summary (--force kind of)
Sometimes there is a need to load multiple backups at once for multiple environments. In most cases this reload happens agains backups that are compatible with given environment.
Currently, if we want to do this, we have to call backup command in a loop, passing there all of environments that we want to impact.
Proposal
We can have a command that will load backups for given environments that matches some pattern within its name/domain, where these backups are loaded accordingly to its compatibility. Examples below:
Command that loads backup name
snapshot-automation-tests
in version3.15
for envs that match patternstaging.*
:Command that loads backup name
snapshot-automation-tests
in latest compatible version for each env that match patternstaging.*
:Note: considering this example, when we have env with on version 3.15 it seeks for
snapshot-automation-tests
in3.15
, if it's not present, it takes3.14
, and so on.Command that loads backup name
snapshot-automation-tests
in version3.15
for specific env:Command that loads backup name
snapshot-automation-tests
in latest compatible version that fits given env:Note: Assuming that test1 i on
3.14
it will take snapshot-automation-tests in version3.14
first.User prompt / CI We have to also consider two options of executing it.
Default one when the user is calling this command by hand - in this case we have to present the user what envs will be affected and what backups in which version (each) will be used. (eg. table with columns: env - backup - version)
Second one, dedicated for the CI that just skips the prompt with confirmation and table that includes summary (--force kind of)