use ordinary replication if clone recreation fails

This commit is contained in:
Christoph Klaffl 2019-02-19 16:00:46 +01:00
parent 234cc61e3a
commit c543f9aa0c
No known key found for this signature in database
GPG Key ID: FC1C525C2A47CC28
1 changed files with 6 additions and 0 deletions

View File

@ -416,6 +416,12 @@ sub syncdataset {
return 0;
}
system($synccmd) == 0 or do {
if (defined $origin) {
print "INFO: clone creation failed, trying ordinary replication as fallback\n";
syncdataset($sourcehost, $sourcefs, $targethost, $targetfs, undef, 1);
return 0;
}
warn "CRITICAL ERROR: $synccmd failed: $?";
if ($exitcode < 2) { $exitcode = 2; }
return 0;