Fix LXC migration from local subvol
This patch reconfigured the rsync parameters, so the fs keeps all settings and works recursive.
This commit is contained in:
committed by
Dietmar Maurer
parent
9fe06408cf
commit
986303caf3
@ -461,7 +461,6 @@ sub storage_migrate {
|
||||
run_command(['/bin/cp', $src, $dst]);
|
||||
|
||||
} else {
|
||||
|
||||
run_command(['/usr/bin/ssh', "root\@${target_host}",
|
||||
'/bin/mkdir', '-p', $dirname]);
|
||||
|
||||
@ -475,8 +474,15 @@ sub storage_migrate {
|
||||
outfunc => sub {});
|
||||
}
|
||||
|
||||
my $cmd = ['/usr/bin/rsync', '--progress', '--sparse', '--whole-file',
|
||||
$src, "[root\@${target_host}]:$dst"];
|
||||
my $cmd;
|
||||
if ($format eq 'subvol') {
|
||||
$cmd = ['/usr/bin/rsync', '--progress', '-X', '-A', '--numeric-ids',
|
||||
'-aH', '--delete', '--no-whole-file', '--inplace',
|
||||
'--one-file-system', "$src/", "[root\@${target_host}]:$dst"];
|
||||
} else {
|
||||
$cmd = ['/usr/bin/rsync', '--progress', '--sparse', '--whole-file',
|
||||
$src, "[root\@${target_host}]:$dst"];
|
||||
}
|
||||
|
||||
my $percent = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user