Commit 2129eab7 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-15071 backup does not store xtrabackup_info in the --extra-lsndir directory

parent a08121c9
......@@ -1464,12 +1464,10 @@ bool backup_finish()
return(false);
}
if (!write_xtrabackup_info(mysql_connection)) {
if (!write_xtrabackup_info(mysql_connection, XTRABACKUP_INFO, opt_history != 0)) {
return(false);
}
return(true);
}
......
......@@ -1398,7 +1398,7 @@ PERCONA_SCHEMA.xtrabackup_history and writes a new history record to the
table containing all the history info particular to the just completed
backup. */
bool
write_xtrabackup_info(MYSQL *connection)
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
{
char *uuid = NULL;
......@@ -1426,7 +1426,7 @@ write_xtrabackup_info(MYSQL *connection)
|| xtrabackup_databases_exclude
);
backup_file_printf(XTRABACKUP_INFO,
backup_file_printf(filename,
"uuid = %s\n"
"name = %s\n"
"tool_name = %s\n"
......@@ -1463,7 +1463,7 @@ write_xtrabackup_info(MYSQL *connection)
xb_stream_name[xtrabackup_stream_fmt], /* format */
xtrabackup_compress ? "compressed" : "N"); /* compressed */
if (!opt_history) {
if (!history) {
goto cleanup;
}
......
......@@ -68,7 +68,7 @@ bool
write_binlog_info(MYSQL *connection);
bool
write_xtrabackup_info(MYSQL *connection);
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history);
bool
write_backup_config_file();
......
......@@ -3513,7 +3513,13 @@ xtrabackup_backup_low()
"to '%s'.\n", filename);
return false;
}
sprintf(filename, "%s/%s", xtrabackup_extra_lsndir,
XTRABACKUP_INFO);
if (!write_xtrabackup_info(mysql_connection, filename, false)) {
msg("mariabackup: Error: failed to write info "
"to '%s'.\n", filename);
return false;
}
}
return true;
......
xtrabackup_checkpoints
xtrabackup_info
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $extra_lsndir=$MYSQLTEST_VARDIR/tmp/extra_lsndir;
mkdir $extra_lsndir;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --extra-lsndir=$extra_lsndir;
--enable_result_log
list_files $extra_lsndir;
rmdir $extra_lsndir;
rmdir $targetdir;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment