From ebf364925998273d5a3d522980c512c8093a1c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 6 Oct 2023 12:30:43 +0300 Subject: [PATCH] MDEV-32361 mariadb-backup --move-back leaves out ib_logfile0 copy_back(): Also copy the dummy empty ib_logfile0 so that MariaDB Server 10.8 or later can be started after --copy-back or --move-back. Thanks to Daniel Black for reporting this. --- extra/mariabackup/backup_copy.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index 05acc1e6765..e8f2e7c7d56 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -1984,8 +1984,10 @@ copy_back() dst_dir, i); unlink(filename); } - } else if (!(ret = copy_or_move_file(ds_tmp, "ib_logfile0", "ib_logfile0", - dst_dir, 1))) { + } + + if (!(ret = copy_or_move_file(ds_tmp, "ib_logfile0", "ib_logfile0", + dst_dir, 1))) { goto cleanup; } ds_destroy(ds_tmp);