Browse Source

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.
pull/590/head
Vladislav Vaintroub 8 years ago
parent
commit
054051bb76
  1. 16
      extra/mariabackup/xtrabackup.cc

16
extra/mariabackup/xtrabackup.cc

@ -6165,9 +6165,19 @@ xb_init()
return(false);
}
if (opt_rsync && xtrabackup_stream_fmt) {
msg("Error: --rsync doesn't work with --stream\n");
return(false);
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;

Loading…
Cancel
Save