don't exclude removed table, hexify blobs
parent
35ac7d1638
commit
2177182ab5
|
@ -4,21 +4,9 @@ HOST={{ mysql_db_host }}
|
||||||
USER={{ mysql_db_user }}
|
USER={{ mysql_db_user }}
|
||||||
DATABASE={{ mysql_db_name }}
|
DATABASE={{ mysql_db_name }}
|
||||||
DB_FILE=unglue.it.sql
|
DB_FILE=unglue.it.sql
|
||||||
EXCLUDED_TABLES=(
|
|
||||||
core_key
|
|
||||||
)
|
|
||||||
|
|
||||||
IGNORED_TABLES_STRING=''
|
echo "Dump all"
|
||||||
for TABLE in "${EXCLUDED_TABLES[@]}"
|
mysqldump --hex-blob --host=${HOST} --user=${USER} --password=${PASSWORD} --single-transaction ${DATABASE} > ${DB_FILE}
|
||||||
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 "gzip the file"
|
echo "gzip the file"
|
||||||
gzip -f ${DB_FILE}
|
gzip -f ${DB_FILE}
|
||||||
|
|
Loading…
Reference in New Issue