diff options
-rw-r--r-- | extra/mariabackup/backup_copy.cc | 22 | ||||
-rw-r--r-- | extra/mariabackup/backup_copy.h | 10 | ||||
-rw-r--r-- | extra/mariabackup/backup_mysql.cc | 16 | ||||
-rw-r--r-- | extra/mariabackup/backup_wsrep.h | 2 | ||||
-rw-r--r-- | extra/mariabackup/innobackupex.cc | 8 | ||||
-rw-r--r-- | extra/mariabackup/wsrep.cc | 12 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 83 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/compat_xtrabackup.result | 21 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/compat_xtrabackup.test | 62 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/extra_lsndir.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/extra_lsndir_stream.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc | 4 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/rpl_slave_info.result | 12 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/rpl_slave_info.test | 6 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/slave_info_norpl.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/slave_info_norpl.test | 4 | ||||
-rw-r--r-- | scripts/wsrep_sst_mariabackup.sh | 16 |
17 files changed, 202 insertions, 86 deletions
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index c3b909fc9b9..da77c651c88 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -1557,7 +1557,7 @@ bool backup_finish() return(false); } - if (!write_xtrabackup_info(mysql_connection, XTRABACKUP_INFO, + if (!write_xtrabackup_info(mysql_connection, MB_INFO, opt_history != 0, true)) { return(false); } @@ -1613,10 +1613,14 @@ ibx_copy_incremental_over_full() const char *ext_list[] = {"frm", "isl", "MYD", "MYI", "MAD", "MAI", "MRG", "TRG", "TRN", "ARM", "ARZ", "CSM", "CSV", "opt", "par", NULL}; - const char *sup_files[] = {"xtrabackup_binlog_info", - "xtrabackup_galera_info", - "xtrabackup_slave_info", - "xtrabackup_info", + const char *sup_files[] = {MB_BINLOG_INFO, + MB_GALERA_INFO, + MB_SLAVE_INFO, + MB_INFO, + XTRABACKUP_BINLOG_INFO, + XTRABACKUP_GALERA_INFO, + XTRABACKUP_SLAVE_INFO, + XTRABACKUP_INFO, "ib_lru_dump", NULL}; datadir_iter_t *it = NULL; @@ -1894,8 +1898,12 @@ copy_back() while (datadir_iter_next(it, &node)) { const char *ext_list[] = {"backup-my.cnf", - "xtrabackup_binary", "xtrabackup_binlog_info", - "xtrabackup_checkpoints", ".qp", ".pmap", ".tmp", + "xtrabackup_binary", + MB_BINLOG_INFO, + MB_METADATA_FILENAME, + XTRABACKUP_BINLOG_INFO, + XTRABACKUP_METADATA_FILENAME, + ".qp", ".pmap", ".tmp", NULL}; const char *filename; char c_tmp; diff --git a/extra/mariabackup/backup_copy.h b/extra/mariabackup/backup_copy.h index 62b2b1bc232..3e1efa98177 100644 --- a/extra/mariabackup/backup_copy.h +++ b/extra/mariabackup/backup_copy.h @@ -6,11 +6,19 @@ #include <mysql.h> #include "datasink.h" -/* special files */ +/* special files, backward compatibility */ #define XTRABACKUP_SLAVE_INFO "xtrabackup_slave_info" #define XTRABACKUP_GALERA_INFO "xtrabackup_galera_info" #define XTRABACKUP_BINLOG_INFO "xtrabackup_binlog_info" #define XTRABACKUP_INFO "xtrabackup_info" +#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints" + +/* special files */ +#define MB_SLAVE_INFO "mariadb_backup_slave_info" +#define MB_GALERA_INFO "mariadb_backup_galera_info" +#define MB_BINLOG_INFO "mariadb_backup_binlog_info" +#define MB_INFO "mariadb_backup_info" +#define MB_METADATA_FILENAME "mariadb_backup_checkpoints" extern bool binlog_locked; diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc index 69448586b33..b660e3112cd 100644 --- a/extra/mariabackup/backup_mysql.cc +++ b/extra/mariabackup/backup_mysql.cc @@ -1339,7 +1339,7 @@ write_slave_info(MYSQL *connection) } mysql_slave_position= strdup(comment.c_ptr()); - return backup_file_print_buf(XTRABACKUP_SLAVE_INFO, sql.ptr(), sql.length()); + return backup_file_print_buf(MB_SLAVE_INFO, sql.ptr(), sql.length()); } @@ -1362,7 +1362,7 @@ write_galera_info(MYSQL *connection) }; /* When backup locks are supported by the server, we should skip - creating xtrabackup_galera_info file on the backup stage, because + creating MB_GALERA_INFO file on the backup stage, because wsrep_local_state_uuid and wsrep_last_committed will be inconsistent without blocking commits. The state file will be created on the prepare stage using the WSREP recovery procedure. */ @@ -1379,7 +1379,7 @@ write_galera_info(MYSQL *connection) goto cleanup; } - result = backup_file_printf(XTRABACKUP_GALERA_INFO, + result = backup_file_printf(MB_GALERA_INFO, "%s:%s\n", state_uuid ? state_uuid : state_uuid55, last_committed ? last_committed : last_committed55); if (result) @@ -1513,7 +1513,7 @@ write_binlog_info(MYSQL *connection) read_mysql_variables(connection, "SHOW VARIABLES", vars, true); if (filename == NULL || position == NULL) { - /* Do not create xtrabackup_binlog_info if binary + /* Do not create MB_BINLOG_INFO if binary log is disabled */ result = true; goto cleanup; @@ -1529,14 +1529,14 @@ write_binlog_info(MYSQL *connection) "filename '%s', position '%s', " "GTID of the last change '%s'", filename, position, gtid) != -1); - result = backup_file_printf(XTRABACKUP_BINLOG_INFO, + result = backup_file_printf(MB_BINLOG_INFO, "%s\t%s\t%s\n", filename, position, gtid); } else { ut_a(asprintf(&mysql_binlog_position, "filename '%s', position '%s'", filename, position) != -1); - result = backup_file_printf(XTRABACKUP_BINLOG_INFO, + result = backup_file_printf(MB_BINLOG_INFO, "%s\t%s\n", filename, position); } @@ -1571,7 +1571,7 @@ operator<<(std::ostream& s, const escape_and_quote& eq) } /*********************************************************************//** -Writes xtrabackup_info file and if backup_history is enable creates +Writes MB_INFO file and if backup_history is enable creates mysql.mariabackup_history and writes a new history record to the table containing all the history info particular to the just completed backup. */ @@ -1647,7 +1647,7 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history, xb_stream_name[xtrabackup_stream_fmt], /* format */ xtrabackup_compress ? "compressed" : "N"); /* compressed */ if (buf_len < 0) { - msg("Error: cannot generate xtrabackup_info"); + msg("Error: cannot generate " MB_INFO); result = false; goto cleanup; } diff --git a/extra/mariabackup/backup_wsrep.h b/extra/mariabackup/backup_wsrep.h index 50a8a3a53e7..d992d925722 100644 --- a/extra/mariabackup/backup_wsrep.h +++ b/extra/mariabackup/backup_wsrep.h @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA #define BACKUP_WSREP_H /*********************************************************************** -Store Galera checkpoint info in the 'xtrabackup_galera_info' file, if that +Store Galera checkpoint info in the MB_GALERA_INFO file, if that information is present in the trx system header. Otherwise, do nothing. */ void xb_write_galera_info(bool incremental_prepare); diff --git a/extra/mariabackup/innobackupex.cc b/extra/mariabackup/innobackupex.cc index b925b41552d..6c9a837b761 100644 --- a/extra/mariabackup/innobackupex.cc +++ b/extra/mariabackup/innobackupex.cc @@ -242,7 +242,7 @@ static struct my_option ibx_long_options[] = GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"galera-info", OPT_GALERA_INFO, "This options creates the " - "xtrabackup_galera_info file which contains the local node state at " + MB_GALERA_INFO " file which contains the local node state at " "the time of the backup. Option should be used when performing the " "backup of MariaDB Galera Cluster. Has no effect when backup locks " "are used to create the backup.", @@ -252,10 +252,10 @@ static struct my_option ibx_long_options[] = {"slave-info", OPT_SLAVE_INFO, "This option is useful when backing " "up a replication slave server. It prints the binary log position " "and name of the master server. It also writes this information to " - "the \"xtrabackup_slave_info\" file as a \"CHANGE MASTER\" command. " + "the \"" MB_SLAVE_INFO "\" file as a \"CHANGE MASTER\" command. " "A new slave for this master can be set up by starting a slave server " "on this backup and issuing a \"CHANGE MASTER\" command with the " - "binary log position saved in the \"xtrabackup_slave_info\" file.", + "binary log position saved in the \"" MB_SLAVE_INFO "\" file.", (uchar *) &opt_ibx_slave_info, (uchar *) &opt_ibx_slave_info, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -518,7 +518,7 @@ static struct my_option ibx_long_options[] = {"extra-lsndir", OPT_EXTRA_LSNDIR, "This option specifies the " "directory in which to save an extra copy of the " - "\"xtrabackup_checkpoints\" file. The option accepts a string " + "\"" MB_METADATA_FILENAME "\" file. The option accepts a string " "argument.", (uchar*) &ibx_xtrabackup_extra_lsndir, (uchar*) &ibx_xtrabackup_extra_lsndir, diff --git a/extra/mariabackup/wsrep.cc b/extra/mariabackup/wsrep.cc index 1b93e9ed10e..45d44fb1fbb 100644 --- a/extra/mariabackup/wsrep.cc +++ b/extra/mariabackup/wsrep.cc @@ -53,9 +53,10 @@ permission notice: /*! Name of file where Galera info is stored on recovery */ #define XB_GALERA_INFO_FILENAME "xtrabackup_galera_info" +#define MB_GALERA_INFO_FILENAME "mariadb_backup_galera_info" /*********************************************************************** -Store Galera checkpoint info in the 'xtrabackup_galera_info' file, if that +Store Galera checkpoint info in the MB_GALERA_INFO_FILENAME file, if that information is present in the trx system header. Otherwise, do nothing. */ void xb_write_galera_info(bool incremental_prepare) @@ -70,7 +71,8 @@ xb_write_galera_info(bool incremental_prepare) /* Do not overwrite existing an existing file to be compatible with servers with older server versions */ if (!incremental_prepare && - my_stat(XB_GALERA_INFO_FILENAME, &statinfo, MYF(0)) != NULL) { + (my_stat(XB_GALERA_INFO_FILENAME, &statinfo, MYF(0)) != NULL || + my_stat(MB_GALERA_INFO_FILENAME, &statinfo, MYF(0)) != NULL)) { return; } @@ -89,11 +91,11 @@ xb_write_galera_info(bool incremental_prepare) return; } - fp = fopen(XB_GALERA_INFO_FILENAME, "w"); + fp = fopen(MB_GALERA_INFO_FILENAME, "w"); if (fp == NULL) { die( - "could not create " XB_GALERA_INFO_FILENAME + "could not create " MB_GALERA_INFO_FILENAME ", errno = %d\n", errno); exit(EXIT_FAILURE); @@ -107,7 +109,7 @@ xb_write_galera_info(bool incremental_prepare) if (fprintf(fp, "%s:%lld", uuid_str, (long long) seqno) < 0) { die( - "could not write to " XB_GALERA_INFO_FILENAME + "could not write to " MB_GALERA_INFO_FILENAME ", errno = %d\n", errno);; } diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 055e8ab85ec..724f2463ff6 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -120,7 +120,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA int sys_var_init(); /* === xtrabackup specific options === */ -char xtrabackup_real_target_dir[FN_REFLEN] = "./xtrabackup_backupfiles/"; +char xtrabackup_real_target_dir[FN_REFLEN] = "./mariadb_backup_files/"; char *xtrabackup_target_dir= xtrabackup_real_target_dir; static my_bool xtrabackup_version; static my_bool verbose; @@ -217,7 +217,6 @@ my_bool opt_extended_validation; my_bool opt_encrypted_backup; /* === metadata of backup === */ -#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints" char metadata_type[30] = ""; /*[full-backuped|log-applied|incremental]*/ static lsn_t metadata_from_lsn; lsn_t metadata_to_lsn; @@ -1129,8 +1128,8 @@ struct my_option xb_client_options[]= { (G_PTR *) &xtrabackup_log_copy_interval, 0, GET_LONG, REQUIRED_ARG, 1000, 0, LONG_MAX, 0, 1, 0}, {"extra-lsndir", OPT_XTRA_EXTRA_LSNDIR, - "(for --backup): save an extra copy of the xtrabackup_checkpoints file " - "in this directory.", + "(for --backup): save an extra copy of the " MB_METADATA_FILENAME + " file in this directory.", (G_PTR *) &xtrabackup_extra_lsndir, (G_PTR *) &xtrabackup_extra_lsndir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"incremental-lsn", OPT_XTRA_INCREMENTAL, @@ -1244,7 +1243,7 @@ struct my_option xb_client_options[]= { {"galera-info", OPT_GALERA_INFO, "This options creates the " - "xtrabackup_galera_info file which contains the local node state at " + MB_GALERA_INFO " file which contains the local node state at " "the time of the backup. Option should be used when performing the " "backup of MariaDB Galera Cluster. Has no effect when backup locks " "are used to create the backup.", @@ -1255,10 +1254,10 @@ struct my_option xb_client_options[]= { "This option is useful when backing " "up a replication slave server. It prints the binary log position " "and name of the master server. It also writes this information to " - "the \"xtrabackup_slave_info\" file as a \"CHANGE MASTER\" command. " + "the \"" MB_SLAVE_INFO "\" file as a \"CHANGE MASTER\" command. " "A new slave for this master can be set up by starting a slave server " "on this backup and issuing a \"CHANGE MASTER\" command with the " - "binary log position saved in the \"xtrabackup_slave_info\" file.", + "binary log position saved in the \"" MB_SLAVE_INFO "\" file.", (uchar *) &opt_slave_info, (uchar *) &opt_slave_info, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -2373,6 +2372,37 @@ end: return(r); } + +/* +Read backup meta info. +@return TRUE on success, FALSE on failure. */ +static +my_bool +mb_read_metadata(const char *dir, const char *name) +{ + char filename[FN_REFLEN]; + snprintf(filename, sizeof(filename), "%s/%s", dir, name); + if (!xtrabackup_read_metadata(filename)) { + msg("mariabackup: error: failed to read metadata from " + "%s", filename); + return false; + } + return true; +} + + +/* +Read backup meta info from the given directory +with backward compatibility. */ +static +my_bool +mb_read_metadata_from_dir(const char *dir) +{ + return mb_read_metadata(dir, MB_METADATA_FILENAME) || + mb_read_metadata(dir, XTRABACKUP_METADATA_FILENAME); +} + + /*********************************************************************** Print backup meta info to a specified buffer. */ static @@ -2412,9 +2442,12 @@ xtrabackup_stream_metadata(ds_ctxt_t *ds_ctxt) mystat.st_size = len; mystat.st_mtime = my_time(0); - stream = ds_open(ds_ctxt, XTRABACKUP_METADATA_FILENAME, &mystat); + stream = ds_open(ds_ctxt, MB_METADATA_FILENAME, &mystat); + if (stream == NULL) { + stream = ds_open(ds_ctxt, XTRABACKUP_METADATA_FILENAME, &mystat); + } if (stream == NULL) { - msg("Error: cannot open output stream for %s", XTRABACKUP_METADATA_FILENAME); + msg("Error: cannot open output stream for %s", MB_METADATA_FILENAME); return(FALSE); } @@ -4451,14 +4484,14 @@ static bool xtrabackup_backup_low() char filename[FN_REFLEN]; sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, - XTRABACKUP_METADATA_FILENAME); + MB_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { msg("Error: failed to write metadata " "to '%s'.", filename); return false; } sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, - XTRABACKUP_INFO); + MB_INFO); if (!write_xtrabackup_info(mysql_connection, filename, false, false)) { msg("Error: failed to write info " "to '%s'.", filename); @@ -5823,7 +5856,6 @@ static ibool prepare_handle_del_files(const char *datadir, const char *db, const static bool xtrabackup_prepare_func(char** argv) { CorruptedPages corrupted_pages; - char metadata_path[FN_REFLEN]; /* cd to target-dir */ @@ -5874,12 +5906,7 @@ static bool xtrabackup_prepare_func(char** argv) /* read metadata of target */ - sprintf(metadata_path, "%s/%s", xtrabackup_target_dir, - XTRABACKUP_METADATA_FILENAME); - - if (!xtrabackup_read_metadata(metadata_path)) { - msg("Error: failed to read metadata from '%s'\n", - metadata_path); + if (!mb_read_metadata_from_dir(xtrabackup_target_dir)) { return(false); } @@ -6038,14 +6065,14 @@ error: metadata_last_lsn = incremental_last_lsn; } - sprintf(filename, "%s/%s", xtrabackup_target_dir, XTRABACKUP_METADATA_FILENAME); + sprintf(filename, "%s/%s", xtrabackup_target_dir, MB_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { msg("mariabackup: Error: failed to write metadata " "to '%s'", filename); ok = false; } else if (xtrabackup_extra_lsndir) { - sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_METADATA_FILENAME); + sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, MB_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { msg("mariabackup: Error: failed to write " "metadata to '%s'", filename); @@ -6802,26 +6829,14 @@ static int main_low(char** argv) return(EXIT_FAILURE); } } else if (xtrabackup_backup && xtrabackup_incremental_basedir) { - char filename[FN_REFLEN]; - - sprintf(filename, "%s/%s", xtrabackup_incremental_basedir, XTRABACKUP_METADATA_FILENAME); - - if (!xtrabackup_read_metadata(filename)) { - msg("mariabackup: error: failed to read metadata from " - "%s", filename); + if (!mb_read_metadata_from_dir(xtrabackup_incremental_basedir)) { return(EXIT_FAILURE); } incremental_lsn = metadata_to_lsn; xtrabackup_incremental = xtrabackup_incremental_basedir; //dummy } else if (xtrabackup_prepare && xtrabackup_incremental_dir) { - char filename[FN_REFLEN]; - - sprintf(filename, "%s/%s", xtrabackup_incremental_dir, XTRABACKUP_METADATA_FILENAME); - - if (!xtrabackup_read_metadata(filename)) { - msg("mariabackup: error: failed to read metadata from " - "%s", filename); + if (!mb_read_metadata_from_dir(xtrabackup_incremental_dir)) { return(EXIT_FAILURE); } diff --git a/mysql-test/suite/mariabackup/compat_xtrabackup.result b/mysql-test/suite/mariabackup/compat_xtrabackup.result new file mode 100644 index 00000000000..484dc0d7d46 --- /dev/null +++ b/mysql-test/suite/mariabackup/compat_xtrabackup.result @@ -0,0 +1,21 @@ +call mtr.add_suppression("InnoDB: New log files created"); +# +# Start of 10.11 tests +# +# +# MDEV-18931 Rename Mariabackup's xtrabackup_* files to mariadb_backup_* +# +CREATE TABLE t1(i INT PRIMARY KEY) ENGINE MYISAM; +INSERT INTO t1 VALUES (1); +# Prepare full backup, apply incremental one +# shutdown server +# remove datadir +# xtrabackup move back +# restart +SELECT * FROM test.t1; +i +1 +DROP TABLE t1; +# +# End of 10.11 tests +# diff --git a/mysql-test/suite/mariabackup/compat_xtrabackup.test b/mysql-test/suite/mariabackup/compat_xtrabackup.test new file mode 100644 index 00000000000..67d043fd436 --- /dev/null +++ b/mysql-test/suite/mariabackup/compat_xtrabackup.test @@ -0,0 +1,62 @@ +call mtr.add_suppression("InnoDB: New log files created"); + +--echo # +--echo # Start of 10.11 tests +--echo # + +--echo # +--echo # MDEV-18931 Rename Mariabackup's xtrabackup_* files to mariadb_backup_* +--echo # + +--let $basedir=$MYSQLTEST_VARDIR/tmp/backup +--let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1 + +CREATE TABLE t1(i INT PRIMARY KEY) ENGINE MYISAM; +INSERT INTO t1 VALUES (1); + +--disable_result_log +--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir +--enable_result_log + +--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir + +# +# Emulate a backup created by an older version: +# Rename mariadb_backup_checkpoints +# + +--move_file $basedir/mariadb_backup_checkpoints $basedir/xtrabackup_checkpoints +--move_file $incremental_dir/mariadb_backup_checkpoints $incremental_dir/xtrabackup_checkpoints + +# +# Emulate a backup created by an older version: +# Rename mariadb_backup_info +# Note, mariadb_backup_info is not currently used during --prepare or --restore +# But it's still good to rename it: +# - we can start using it during --prepare or --restore +# - to provide full emulation +# + +--move_file $basedir/mariadb_backup_info $basedir/mariadb_backup_info +--move_file $incremental_dir/mariadb_backup_info $incremental_dir/mariadb_backup_info + + +--disable_result_log +--echo # Prepare full backup, apply incremental one +--exec $XTRABACKUP --prepare --target-dir=$basedir +--exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir +--enable_result_log + +--let $targetdir=$basedir +--source include/restart_and_restore.inc +--enable_result_log + +SELECT * FROM test.t1; + +DROP TABLE t1; +--rmdir $basedir +--rmdir $incremental_dir + +--echo # +--echo # End of 10.11 tests +--echo # diff --git a/mysql-test/suite/mariabackup/extra_lsndir.result b/mysql-test/suite/mariabackup/extra_lsndir.result index a25c45a13d1..58e395eb65e 100644 --- a/mysql-test/suite/mariabackup/extra_lsndir.result +++ b/mysql-test/suite/mariabackup/extra_lsndir.result @@ -1,2 +1,2 @@ -xtrabackup_checkpoints -xtrabackup_info +mariadb_backup_checkpoints +mariadb_backup_info diff --git a/mysql-test/suite/mariabackup/extra_lsndir_stream.result b/mysql-test/suite/mariabackup/extra_lsndir_stream.result index a25c45a13d1..58e395eb65e 100644 --- a/mysql-test/suite/mariabackup/extra_lsndir_stream.result +++ b/mysql-test/suite/mariabackup/extra_lsndir_stream.result @@ -1,2 +1,2 @@ -xtrabackup_checkpoints -xtrabackup_info +mariadb_backup_checkpoints +mariadb_backup_info diff --git a/mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc b/mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc index 4a83c9c394e..ba0116a81cf 100644 --- a/mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc +++ b/mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc @@ -1,8 +1,8 @@ --disable_query_log ---file_exists $targetdir/xtrabackup_slave_info +--file_exists $targetdir/mariadb_backup_slave_info CREATE TEMPORARY TABLE tmp_slave_info(lineno SERIAL, line TEXT); --replace_result $targetdir TARGETDIR ---eval LOAD DATA LOCAL INFILE '$targetdir/xtrabackup_slave_info' INTO TABLE tmp_slave_info (line); +--eval LOAD DATA LOCAL INFILE '$targetdir/mariadb_backup_slave_info' INTO TABLE tmp_slave_info (line); SELECT lineno, regexp_replace( diff --git a/mysql-test/suite/mariabackup/rpl_slave_info.result b/mysql-test/suite/mariabackup/rpl_slave_info.result index ec27166ecfb..2b9b6223401 100644 --- a/mysql-test/suite/mariabackup/rpl_slave_info.result +++ b/mysql-test/suite/mariabackup/rpl_slave_info.result @@ -11,8 +11,8 @@ connection master; CREATE TABLE t(i INT); connection slave; "using_gtid: Slave_Pos" -FOUND 1 /gtid_slave_pos/ in xtrabackup_slave_info -NOT FOUND /MASTER_LOG_FILE/ in xtrabackup_slave_info +FOUND 1 /gtid_slave_pos/ in mariadb_backup_slave_info +NOT FOUND /MASTER_LOG_FILE/ in mariadb_backup_slave_info lineno line 1 SET GLOBAL gtid_slave_pos = '<NUM-NUM-NUM>'; 2 CHANGE MASTER TO master_use_gtid = slave_pos; @@ -21,8 +21,8 @@ lineno line ######################## include/stop_slave.inc SET GLOBAL gtid_slave_pos=""; -NOT FOUND /gtid_slave_pos/ in xtrabackup_slave_info -FOUND 1 /MASTER_LOG_FILE/ in xtrabackup_slave_info +NOT FOUND /gtid_slave_pos/ in mariadb_backup_slave_info +FOUND 1 /MASTER_LOG_FILE/ in mariadb_backup_slave_info lineno line 1 CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=<NUM>; ############### @@ -34,8 +34,8 @@ connection master; INSERT INTO t VALUES(1); connection slave; "using_gtid: No" -NOT FOUND /gtid_slave_pos/ in xtrabackup_slave_info -FOUND 1 /MASTER_LOG_FILE/ in xtrabackup_slave_info +NOT FOUND /gtid_slave_pos/ in mariadb_backup_slave_info +FOUND 1 /MASTER_LOG_FILE/ in mariadb_backup_slave_info lineno line 1 CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=<NUM>; connection master; diff --git a/mysql-test/suite/mariabackup/rpl_slave_info.test b/mysql-test/suite/mariabackup/rpl_slave_info.test index 1c5dd89acc9..73ad00f13a0 100644 --- a/mysql-test/suite/mariabackup/rpl_slave_info.test +++ b/mysql-test/suite/mariabackup/rpl_slave_info.test @@ -22,7 +22,7 @@ CREATE TABLE t(i INT); exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir; --enable_result_log ---let SEARCH_FILE=$targetdir/xtrabackup_slave_info +--let SEARCH_FILE=$targetdir/mariadb_backup_slave_info --let SEARCH_PATTERN=gtid_slave_pos --source include/search_pattern_in_file.inc --let SEARCH_PATTERN=MASTER_LOG_FILE @@ -45,7 +45,7 @@ SET GLOBAL gtid_slave_pos=""; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir; --enable_result_log ---let SEARCH_FILE=$targetdir/xtrabackup_slave_info +--let SEARCH_FILE=$targetdir/mariadb_backup_slave_info --let SEARCH_PATTERN=gtid_slave_pos --source include/search_pattern_in_file.inc --let SEARCH_PATTERN=MASTER_LOG_FILE @@ -73,7 +73,7 @@ INSERT INTO t VALUES(1); exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir; --enable_result_log ---let SEARCH_FILE=$targetdir/xtrabackup_slave_info +--let SEARCH_FILE=$targetdir/mariadb_backup_slave_info --let SEARCH_PATTERN=gtid_slave_pos --source include/search_pattern_in_file.inc --let SEARCH_PATTERN=MASTER_LOG_FILE diff --git a/mysql-test/suite/mariabackup/slave_info_norpl.result b/mysql-test/suite/mariabackup/slave_info_norpl.result index 04ca2fb2242..18cda94065b 100644 --- a/mysql-test/suite/mariabackup/slave_info_norpl.result +++ b/mysql-test/suite/mariabackup/slave_info_norpl.result @@ -8,7 +8,7 @@ SELECT @@global.gtid_slave_pos; @@global.gtid_slave_pos -# Without any masters the file xtrabackup_slave_info is not created +# Without any masters the file mariadb_backup_slave_info is not created line [00] YYYY-MM-DD hh:mm:ss Failed to get master binlog coordinates from SHOW SLAVE STATUS.This means that the server is not a replication slave. Ignoring the --slave-info option diff --git a/mysql-test/suite/mariabackup/slave_info_norpl.test b/mysql-test/suite/mariabackup/slave_info_norpl.test index 0d2d2ed4861..298aaa2dda5 100644 --- a/mysql-test/suite/mariabackup/slave_info_norpl.test +++ b/mysql-test/suite/mariabackup/slave_info_norpl.test @@ -19,13 +19,13 @@ SELECT @@global.gtid_slave_pos; --echo ---echo # Without any masters the file xtrabackup_slave_info is not created +--echo # Without any masters the file mariadb_backup_slave_info is not created --disable_result_log exec $XTRABACKUP $XTRABACKUP_ARGS >$XTRABACKUP_OUT; --enable_result_log --error 1 ---file_exists $targetdir/xtrabackup_slave_info +--file_exists $targetdir/mariadb_backup_slave_info --source include/show_xtrabackup_slave_info_out.inc --remove_file $XTRABACKUP_OUT rmdir $targetdir; diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 7e26af83701..a6934f3881f 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -102,7 +102,7 @@ if [ -z "$BACKUP_BIN" ]; then fi DATA="$WSREP_SST_OPT_DATA" -INFO_FILE='xtrabackup_galera_info' +INFO_FILE='mariadb_backup_galera_info' IST_FILE='xtrabackup_ist' MAGIC_FILE="$DATA/$INFO_FILE" @@ -1317,9 +1317,9 @@ else # joiner [ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" - # May need xtrabackup_checkpoints later on + # May need mariadb_backup_checkpoints later on [ -f "$DATA/xtrabackup_binary" ] && rm -f "$DATA/xtrabackup_binary" - [ -f "$DATA/xtrabackup_galera_info" ] && rm -f "$DATA/xtrabackup_galera_info" + [ -f "$DATA/mariadb_backup_galera_info" ] && rm -f "$DATA/mariadb_backup_galera_info" ADDR="$WSREP_SST_OPT_HOST" @@ -1448,14 +1448,14 @@ else # joiner wsrep_log_info "Waiting for SST streaming to complete!" monitor_process $jpid - if [ ! -s "$DATA/xtrabackup_checkpoints" ]; then - wsrep_log_error "xtrabackup_checkpoints missing," \ + if [ ! -s "$DATA/mariadb_backup_checkpoints" ]; then + wsrep_log_error "mariadb_backup_checkpoints missing," \ "failed mariabackup/SST on donor" exit 2 fi # Compact backups are not supported by mariabackup - if grep -qw -F 'compact = 1' "$DATA/xtrabackup_checkpoints"; then + if grep -qw -F 'compact = 1' "$DATA/mariadb_backup_checkpoints"; then wsrep_log_info "Index compaction detected" wsrel_log_error "Compact backups are not supported by mariabackup" exit 2 @@ -1519,14 +1519,14 @@ else # joiner if [ -n "$WSREP_SST_OPT_BINLOG" ]; then cd "$DATA" binlogs="" - if [ -f 'xtrabackup_binlog_info' ]; then + if [ -f 'mariadb_backup_binlog_info' ]; then NL=$'\n' while read bin_string || [ -n "$bin_string" ]; do bin_file=$(echo "$bin_string" | cut -f1) if [ -f "$bin_file" ]; then binlogs="$binlogs${binlogs:+$NL}$bin_file" fi - done < 'xtrabackup_binlog_info' + done < 'mariadb_backup_binlog_info' else binlogs=$(ls -d -1 "$binlog_base".[0-9]* 2>/dev/null || :) fi |