don't exclude removed table, hexify blobs
parent
35ac7d1638
commit
2177182ab5
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue