Skip to content
Snippets Groups Projects
Unverified Commit f725e662 authored by Harald Nezbeda's avatar Harald Nezbeda Committed by GitHub
Browse files

Fixes mysql dump using export.sh - #14

parent 9c33f8b4
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,11 @@
_os="`uname`"
_now=$(date +"%m_%d_%Y")
_file="wp-data/data_$_now.sql"
docker-compose run --rm db sh -c 'exec mysqldump "$MYSQL_DATABASE" -uroot -p"$MYSQL_ROOT_PASSWORD"' > $_file
# Export dump
EXPORT_COMMAND='exec mysqldump "$MYSQL_DATABASE" -uroot -p"$MYSQL_ROOT_PASSWORD"'
docker-compose exec db sh -c "$EXPORT_COMMAND" > $_file
if [[ $_os == "Darwin"* ]] ; then
sed -i '.bak' 1,1d $_file
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment