Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 848 forks source link

Improve db scripts #2608

Closed msaggiorato closed 2 years ago

msaggiorato commented 2 years ago

This is a backport from the port I've made of this scripts from VVV into a docker solution we're currently using (and I intend to slowly port back to VVV).

Basically allows to:

Allow to restore specific databases with db_restore

By running db_restore db_name_1 db_name_2 you can only restore specific databases only.

Force restoration when running db_restore

This allows to run db_restore --force or db_restore -f to delete all databases being restored before restoring them. Allows to easily force restore to a dump. Most useful in conjunction with specific databases usage

Minor other improvements

Didn't test this myself on VVV (because i cannot run it right now). Will see how the provisioner goes, but none of these changes should be breaking.

Once we agree if this is to be merged, I'll update the CHANGELOG.md file.

Checks

update-docs[bot] commented 2 years ago

Thanks for opening this pull request! Make sure CHANGELOG.md gets updated with this change, additionally any docs that need updated can be found at https://github.com/Varying-Vagrant-Vagrants/varyingvagrantvagrants.org

GitHub
GitHub - Varying-Vagrant-Vagrants/varyingvagrantvagrants.org: The VVV docs and website
The VVV docs and website. Contribute to Varying-Vagrant-Vagrants/varyingvagrantvagrants.org development by creating an account on GitHub.
tomjn commented 2 years ago

Not sure why the provisioners are failing with /srv/provision/provision-helpers.sh: line 314: $2: unbound variable but probably related to set -u

msaggiorato commented 2 years ago

Fixed undefined variable issues