From cb708c104f40d9168a6df8cedd8098542cf2eab9 Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Fri, 28 Feb 2020 17:59:49 -0500 Subject: [PATCH] add --hex-blob option --- automysqlbackup | 5 +++++ automysqlbackup.conf | 3 +++ 2 files changed, 8 insertions(+) diff --git a/automysqlbackup b/automysqlbackup index a1575d6..38212f0 100755 --- a/automysqlbackup +++ b/automysqlbackup @@ -86,6 +86,7 @@ load_default_config() { CONFIG_mysql_dump_use_separate_dirs='yes' CONFIG_mysql_dump_compression='gzip' CONFIG_mysql_dump_commcomp='no' + CONFIG_mysql_dump_hex_blob='no' CONFIG_mysql_dump_latest='no' CONFIG_mysql_dump_latest_clean_filenames='no' CONFIG_mysql_dump_max_allowed_packet='' @@ -532,6 +533,10 @@ parse_configuration () { opt=( "${opt[@]}" "--max_allowed_packet=${CONFIG_mysql_dump_max_allowed_packet}" ) opt_fullschema=( "${opt_fullschema[@]}" "--max_allowed_packet=${CONFIG_mysql_dump_max_allowed_packet}" ) } + [[ "${CONFIG_mysql_dump_hex_blob}" = "yes" ]] && { + opt=( "${opt[@]}" '--hex-blob' ) + opt_fullschema=( "${opt_fullschema[@]}" '--hex-blob' ) + } [[ "${CONFIG_mysql_dump_socket}" ]] && { opt=( "${opt[@]}" "--socket=${CONFIG_mysql_dump_socket}" ) mysql_opt=( "${mysql_opt[@]}" "--socket=${CONFIG_mysql_dump_socket}" ) diff --git a/automysqlbackup.conf b/automysqlbackup.conf index fc72be0..78523f0 100644 --- a/automysqlbackup.conf +++ b/automysqlbackup.conf @@ -204,6 +204,9 @@ CONFIG_db_exclude_pattern=() # Choose Compression type. (gzip, bzip2 or xz) #CONFIG_mysql_dump_compression='gzip' +# Use hex-blob for backup? +#CONFIG_mysql_dump_hex_blob='no' + # Store an additional copy of the latest backup to a standard # location so it can be downloaded by third party scripts. #CONFIG_mysql_dump_latest='no'