mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
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.
This commit is contained in:
parent
e30cdb68e5
commit
054051bb76
1 changed files with 13 additions and 3 deletions
|
@ -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…
Reference in a new issue