don't exclude removed table, hexify blobs

dependabot/pip/cryptography-3.2
eric 2020-04-27 17:31:09 -04:00
parent 35ac7d1638
commit 2177182ab5
1 changed files with 2 additions and 14 deletions

View File

@ -4,21 +4,9 @@ HOST={{ mysql_db_host }}
USER={{ mysql_db_user }}
DATABASE={{ mysql_db_name }}
DB_FILE=unglue.it.sql
EXCLUDED_TABLES=(
core_key
)
IGNORED_TABLES_STRING=''
for TABLE in "${EXCLUDED_TABLES[@]}"
do :
IGNORED_TABLES_STRING+=" --ignore-table=${DATABASE}.${TABLE}"
done
echo "Dump structure"
mysqldump --host=${HOST} --user=${USER} --password=${PASSWORD} --single-transaction --no-data ${DATABASE} > ${DB_FILE}
echo "Dump content"
mysqldump --host=${HOST} --user=${USER} --password=${PASSWORD} --no-create-info ${DATABASE} ${IGNORED_TABLES_STRING} >> ${DB_FILE}
echo "Dump all"
mysqldump --hex-blob --host=${HOST} --user=${USER} --password=${PASSWORD} --single-transaction ${DATABASE} > ${DB_FILE}
echo "gzip the file"
gzip -f ${DB_FILE}