Skip to content
Permalink
Browse files
MDEV-15071 backup does not store xtrabackup_info in the --extra-lsndi…
…r directory
  • Loading branch information
vaintroub committed Feb 15, 2018
1 parent a08121c commit 2129eab
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
@@ -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;
@@ -0,0 +1,2 @@
xtrabackup_checkpoints
xtrabackup_info
@@ -0,0 +1,9 @@
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;

0 comments on commit 2129eab

Please sign in to comment.