Commit 054051bb authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-14150 - backup should fail early if rsync is missing

check availability of rsync utility early , when starting backup with
--rsync. Fail if it is not there.
parent e30cdb68
......@@ -6165,10 +6165,20 @@ xb_init()
return(false);
}
if (opt_rsync && xtrabackup_stream_fmt) {
if (xtrabackup_backup && opt_rsync)
{
if (xtrabackup_stream_fmt)
{
msg("Error: --rsync doesn't work with --stream\n");
return(false);
}
bool have_rsync = IF_WIN(false, (system("rsync --version > /dev/null 2>&1") == 0));
if (!have_rsync)
{
msg("Error: rsync executable not found, cannot run backup with --rsync\n");
return false;
}
}
n_mixed_options = 0;
......
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