Browse Source

adds monitoring instructions for restore db operation

test
Jean-Christophe Vanhalle 1 year ago
parent
commit
bbd07933ff
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      replace-db.sh

+ 2
- 0
replace-db.sh View File

@@ -36,5 +36,7 @@ echo "dropping ${DB_NAME}"
docker exec "${PREFIX}-db" /bin/sh -c "mysqladmin --force -uroot -p${DB_ROOT_PASSWORD} drop ${DB_NAME}"
echo "creating ${DB_NAME}"
docker exec "${PREFIX}-db" /bin/sh -c "mysqladmin -uroot -p${DB_ROOT_PASSWORD} create ${DB_NAME}"
echo "run this command in another terminal/window to monitor progress:"
echo "docker exec -it watch -n1 ${PREFIX}-db du /var/lib/mysql/${DB_NAME}-sh"
echo "importing ${dump_filename_path} (${PREFIX}-db/tmp/dump.sql) into ${DB_NAME}"
docker exec "${PREFIX}-db" /bin/sh -c "mysql -uroot -p${DB_ROOT_PASSWORD} ${DB_NAME} < /tmp/dump.sql"

Loading…
Cancel
Save