Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 3680a85

Browse files
authored
Merge branch 'develop' into Mte90/2051
2 parents 08debc2 + 38cd5c5 commit 3680a85

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ permalink: /docs/en-US/changelog/
1717
* Major refactor of the main provisioner, and introduction of a hook system to be used while provisioning ( #2230, #2238 )
1818
* Support for cloning git repositories into sites via `config.yml` ( #2247 )
1919
* Install WP-CLI doctor package ( #2051 )
20+
* Enhanced database backup terminal output ( #2256 )
2021

2122
### Deprecations
2223

config/homebin/db_backup

+18-8
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,29 @@
33
# Create individual SQL files for each database. These files
44
# are imported automatically during an initial provision if
55
# the databases exist per the import-sql.sh process.
6+
trap 'rm -rf $TMPFIFODIR' EXIT; TMPFIFODIR=$(mktemp -d); mkfifo $TMPFIFODIR/dbnames
7+
68
mkdir -p /srv/database/backups
79
echo " * Performing Database Backups"
10+
databases=()
11+
812
mysql --user="root" --password="root" -e 'show databases' | \
9-
grep -v -F "Database" | \
10-
while read db_name;
13+
grep -v -F "Database" > dbnames &
14+
while read db_name
1115
do
1216
# skip these databases
13-
[ "${db_name}" == "mysql" ] && continue;
14-
[ "${db_name}" == "information_schema" ] && continue;
15-
[ "${db_name}" == "performance_schema" ] && continue;
16-
[ "${db_name}" == "test" ] && continue;
17+
[ "${db_name}" == "mysql" ] && echo " - skipped ${db_name}" && continue;
18+
[ "${db_name}" == "information_schema" ] && echo " - skipped ${db_name}" && continue;
19+
[ "${db_name}" == "performance_schema" ] && echo " - skipped ${db_name}" && continue;
20+
[ "${db_name}" == "test" ] && echo " - skipped ${db_name}" && continue;
21+
databases+=( "${db_name}" )
22+
done < dbnames
1723

18-
echo " - Backing up \"${db_name}\" to database/backups/${db_name}.sql"
19-
mysqldump -uroot -proot "${db_name}" > "/srv/database/backups/${db_name}.sql";
24+
count=0
25+
for db in "${databases[@]}"
26+
do
27+
printf " - %2s/%s Backing up %-23s to 'database/backups/%s.sql'\n" "${count}" "${#databases[@]}" "'${db}'" "${db}"
28+
mysqldump -uroot -proot "${db}" > "/srv/database/backups/${db}.sql";
29+
let "count=count+1"
2030
done
2131
echo " * Finished backing up databases to the database/sql/backups folder"

provision/core/php/provision.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function php_register_packages() {
2727

2828
# Extra PHP modules that we find useful
2929
php-pear
30+
php-pcov
3031
php-ssh2
3132
php-yaml
3233
"php${VVV_BASE_PHPVERSION}-bcmath"
@@ -44,13 +45,13 @@ function php_register_packages() {
4445

4546
# ImageMagick
4647
VVV_PACKAGE_LIST+=(
47-
php-imagick
48+
php${VVV_BASE_PHPVERSION}-imagick
4849
imagemagick
4950
)
5051

5152
# XDebug
5253
VVV_PACKAGE_LIST+=(
53-
php-xdebug
54+
php${VVV_BASE_PHPVERSION}-xdebug
5455

5556
# Required for Webgrind
5657
graphviz
@@ -103,6 +104,7 @@ function phpfpm_finalize() {
103104
# Disable PHP Xdebug module by default
104105
echo " * Disabling XDebug PHP extension"
105106
phpdismod xdebug
107+
phpdismod pcov
106108

107109
# Add the vagrant user to the www-data group so that it has better access
108110
# to PHP and Nginx related files.
@@ -131,8 +133,8 @@ vvv_add_hook nginx_upstreams php_nginx_upstream
131133
function memcached_register_packages() {
132134
# MemCached
133135
VVV_PACKAGE_LIST+=(
134-
php-memcache
135-
php-memcached
136+
php${VVV_BASE_PHPVERSION}-memcache
137+
php${VVV_BASE_PHPVERSION}-memcached
136138

137139
# memcached is made available for object caching
138140
memcached

0 commit comments

Comments
 (0)