Skip to content
Permalink
Browse files

Mariabackup: Remove support for .xbcrypt files

  • Loading branch information...
dr-m committed May 26, 2017
1 parent 7e22050 commit cede2b6f0f78a29addd75ef4895404db69f96ba7
@@ -1774,7 +1774,7 @@ copy_back()
const char *ext_list[] = {"backup-my.cnf", "xtrabackup_logfile",
"xtrabackup_binary", "xtrabackup_binlog_info",
"xtrabackup_checkpoints", ".qp", ".pmap", ".tmp",
".xbcrypt", NULL};
NULL};
const char *filename;
char c_tmp;
int i_tmp;
@@ -1807,7 +1807,7 @@ copy_back()

filename = base_name(node.filepath);

/* skip .qp and .xbcrypt files */
/* skip .qp files */
if (filename_matches(filename, ext_list)) {
continue;
}
@@ -1899,24 +1899,8 @@ decrypt_decompress_file(const char *filepath, uint thread_n)

cmd << IF_WIN("type ","cat ") << filepath;

if (ends_with(filepath, ".xbcrypt") && opt_decrypt) {
cmd << " | xbcrypt --decrypt --encrypt-algo="
<< xtrabackup_encrypt_algo_names[opt_decrypt_algo];
if (xtrabackup_encrypt_key) {
cmd << " --encrypt-key=" << xtrabackup_encrypt_key;
} else {
cmd << " --encrypt-key-file="
<< xtrabackup_encrypt_key_file;
}
dest_filepath[strlen(dest_filepath) - 8] = 0;
message << "decrypting";
needs_action = true;
}

if (opt_decompress
&& (ends_with(filepath, ".qp")
|| (ends_with(filepath, ".qp.xbcrypt")
&& opt_decrypt))) {
&& ends_with(filepath, ".qp")) {
cmd << " | qpress -dio ";
dest_filepath[strlen(dest_filepath) - 3] = 0;
if (needs_action) {
@@ -1967,8 +1951,7 @@ decrypt_decompress_thread_func(void *arg)
continue;
}

if (!ends_with(node.filepath, ".qp")
&& !ends_with(node.filepath, ".xbcrypt")) {
if (!ends_with(node.filepath, ".qp")) {
continue;
}

@@ -1435,8 +1435,7 @@ write_xtrabackup_info(MYSQL *connection)
"partial = %s\n"
"incremental = %s\n"
"format = %s\n"
"compressed = %s\n"
"encrypted = %s\n",
"compressed = %s\n",
uuid, /* uuid */
opt_history ? opt_history : "", /* name */
tool_name, /* tool_name */
@@ -1454,8 +1453,7 @@ write_xtrabackup_info(MYSQL *connection)
is_partial? "Y" : "N",
xtrabackup_incremental ? "Y" : "N", /* incremental */
xb_stream_name[xtrabackup_stream_fmt], /* format */
xtrabackup_compress ? "compressed" : "N", /* compressed */
xtrabackup_encrypt ? "Y" : "N"); /* encrypted */
xtrabackup_compress ? "compressed" : "N"); /* compressed */

if (!opt_history) {
goto cleanup;
@@ -1481,8 +1479,7 @@ write_xtrabackup_info(MYSQL *connection)
"partial ENUM('Y', 'N') DEFAULT NULL,"
"incremental ENUM('Y', 'N') DEFAULT NULL,"
"format ENUM('file', 'tar', 'xbstream') DEFAULT NULL,"
"compressed ENUM('Y', 'N') DEFAULT NULL,"
"encrypted ENUM('Y', 'N') DEFAULT NULL"
"compressed ENUM('Y', 'N') DEFAULT NULL"
") CHARACTER SET utf8 ENGINE=innodb", false);


@@ -1492,8 +1489,8 @@ write_xtrabackup_info(MYSQL *connection)
<< "uuid, name, tool_name, tool_command, tool_version,"
<< "ibbackup_version, server_version, start_time, end_time,"
<< "lock_time, binlog_pos, innodb_from_lsn, innodb_to_lsn,"
<< "partial, incremental, format, compressed, "
<< "encrypted) values("
<< "partial, incremental, format, compressed) "
<< "values("
<< escape_and_quote(connection, uuid) << ","
<< escape_and_quote(connection, opt_history) << ","
<< escape_and_quote(connection, tool_name) << ","
@@ -1510,8 +1507,7 @@ write_xtrabackup_info(MYSQL *connection)
<< ESCAPE_BOOL(is_partial) << ","
<< ESCAPE_BOOL(xtrabackup_incremental)<< ","
<< escape_and_quote(connection,xb_stream_name[xtrabackup_stream_fmt]) <<","
<< ESCAPE_BOOL(xtrabackup_compress) << ","
<< ESCAPE_BOOL(xtrabackup_encrypt) <<")";
<< ESCAPE_BOOL(xtrabackup_compress) << ")";

xb_mysql_query(mysql_connection, oss.str().c_str(), false);

@@ -1577,14 +1573,6 @@ char *make_argv(char *buf, size_t len, int argc, char **argv)
if (strncmp(*argv, "--password", strlen("--password")) == 0) {
arg = "--password=...";
}
if (strncmp(*argv, "--encrypt-key",
strlen("--encrypt-key")) == 0) {
arg = "--encrypt-key=...";
}
if (strncmp(*argv, "--encrypt_key",
strlen("--encrypt_key")) == 0) {
arg = "--encrypt_key=...";
}
left-= ut_snprintf(buf + len - left, left,
"%s%c", arg, argc > 1 ? ' ' : 0);
++argv; --argc;

0 comments on commit cede2b6

Please sign in to comment.
You can’t perform that action at this time.