[pve-devel] applied: [PATCH zsync] Fix: You can now use the pool as replication source.
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Mar 21 14:05:37 CET 2018
applied, thanks
On 11/17/17 1:34 PM, Wolfgang Link wrote:
> In previous version you need a dataset as replication source.
> ---
> pve-zsync | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/pve-zsync b/pve-zsync
> index b3241ff..4020ba6 100644
> --- a/pve-zsync
> +++ b/pve-zsync
> @@ -860,7 +860,8 @@ sub snapshot_destroy {
> if ($dest) {
> my @ssh = $dest->{ip} ? ('ssh', "root\@$dest->{ip}", '--') : ();
>
> - my $path = "$dest->{all}\/$source->{last_part}";
> + my $path = "$dest->{all}";
> + $path .= "/$source->{last_part}" if $source->{last_part};
>
> eval {
> run_cmd([@ssh, @zfscmd, "$path\@$snap"]);
> @@ -877,7 +878,13 @@ sub snapshot_exist {
> my $cmd = [];
> push @$cmd, 'ssh', "root\@$dest->{ip}", '--' if $dest->{ip};
> push @$cmd, 'zfs', 'list', '-rt', 'snapshot', '-Ho', 'name';
> - push @$cmd, "$dest->{all}/$source->{last_part}\@$source->{old_snap}";
> +
> + my $path = $dest->{all};
> + $path .= "/$source->{last_part}" if $source->{last_part};
> + $path .= "\@$source->{old_snap}";
> +
> + push @$cmd, $path;
> +
>
> my $text = "";
> eval {$text =run_cmd($cmd);};
> @@ -910,7 +917,8 @@ sub send_image {
> my $bwl = $param->{limit}*1024;
> push @$cmd, \'|', 'cstream', '-t', $bwl;
> }
> - my $target = "$dest->{all}/$source->{last_part}";
> + my $target = "$dest->{all}";
> + $target .= "/$source->{last_part}" if $source->{last_part};
> $target =~ s!/+!/!g;
>
> push @$cmd, \'|';
>
More information about the pve-devel
mailing list