DescriptionCreate a backup copy of the envs file.
In a pre-imp call with Gary, we decided the
following strategy: a backup copy of the
environments.yaml file is created once per
quickstart session the first time environments
are changed by the user. This way we prevent the
original backup to be overwritten if the user
makes two subsequent changes to the envs.
Tests: `make check`.
QA:
- Create a backup copy of your environments file:
`cp ~/.juju/environments.yaml ~/environments.yaml.bak`.
- Run `.venv/bin/python juju-quickstart -i`, select one
of your environments, exit with ^X without changing anything.
Check your original file has not been changed.
- Run `.venv/bin/python juju-quickstart -i`, change something
(e.g. create, remove or change an environment, or just change
the default one). Change at least two environments.
Exit with ^X. The envs.yaml file now should be the one
generated by quickstart and should reflect your changes.
It also includes the path to the backup copy, which
should be your original file.
- Restore your original environments file:
`mv ~/environments.yaml.bak ~/.juju/environments.yaml`.
Done, thank you!
https://code.launchpad.net/~frankban/juju-quickstart/envs-backup/+merge/201449
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : Create a backup copy of the envs file. #
MessagesTotal messages: 3
|