From 07d54eba92531a7d01130f424a9b142917cec1d3 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Thu, 3 Oct 2024 14:18:32 +0200 Subject: [PATCH] Add fix to init script from mandersson --- templates/mariadb_backup/start_replica_from_init.erb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mariadb_backup/start_replica_from_init.erb.sh b/templates/mariadb_backup/start_replica_from_init.erb.sh index 4548cab..7dd2eda 100644 --- a/templates/mariadb_backup/start_replica_from_init.erb.sh +++ b/templates/mariadb_backup/start_replica_from_init.erb.sh @@ -7,7 +7,7 @@ if [[ -f ${init_file} ]]; then master_command="${master_command}, MASTER_HOST='<%= @first_db %>', MASTER_USER='backup'" master_command="${master_command}, MASTER_PASSWORD='<%= @backup_password%>', MASTER_SSL=1" master_command="${master_command}, MASTER_CONNECT_RETRY=20" - zcat ${init_file} | ${mysql} + zcat ${init_file} | tail +2 | ${mysql} ${mysql} -e "${master_command}" ${mysql} -e "START SLAVE" sleep 3s