Skip to content

Commit

Permalink
Merge pull request #1 from lamixer/lamixer-patch-1
Browse files Browse the repository at this point in the history
Update pve-zsync
  • Loading branch information
lamixer authored Apr 25, 2024
2 parents 235f034 + 6240515 commit 85dd28c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pve-zsync
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ sub parse_argv {
dest_user => undef,
prepend_storage_id => undef,
compressed => undef,
encrypted => undef,
properties => undef,
dest_config_path => undef,
};
Expand All @@ -272,6 +273,7 @@ sub parse_argv {
'dest-user=s' => \$param->{dest_user},
'prepend-storage-id' => \$param->{prepend_storage_id},
'compressed' => \$param->{compressed},
'encrypted' => \$param->{encrypted},
'properties' => \$param->{properties},
'dest-config-path=s' => \$param->{dest_config_path},
);
Expand Down Expand Up @@ -346,6 +348,7 @@ sub param_to_job {
$job->{dest_user} = $param->{dest_user};
$job->{prepend_storage_id} = !!$param->{prepend_storage_id};
$job->{compressed} = !!$param->{compressed};
$job->{encrypted} = !!$param->{encrypted};
$job->{properties} = !!$param->{properties};
$job->{dest_config_path} = $param->{dest_config_path} if $param->{dest_config_path};

Expand Down Expand Up @@ -474,6 +477,7 @@ sub format_job {
$text .= " --dest-user $job->{dest_user}";
$text .= " --prepend-storage-id" if $job->{prepend_storage_id};
$text .= " --compressed" if $job->{compressed};
$text .= " --encrypted" if $job->{encrypted};
$text .= " --properties" if $job->{properties};
$text .= " --dest-config-path $job->{dest_config_path}" if $job->{dest_config_path};
$text .= "\n";
Expand Down Expand Up @@ -1035,6 +1039,7 @@ sub send_image {
push @$cmd, 'zfs', 'send';
push @$cmd, '-L', if $param->{compressed}; # no effect if dataset never had large recordsize
push @$cmd, '-c', if $param->{compressed};
push @$cmd, '-w', if $param->{encrypted};
push @$cmd, '-p', if $param->{properties};
push @$cmd, '-v' if $param->{verbose};

Expand Down Expand Up @@ -1202,6 +1207,9 @@ $PROGNAME create --dest <string> --source <string> [OPTIONS]
zstd_compress or large_blocks are in use by the source, they need to be enabled on
the target as well.
--encrypted
If specified, send data in raw encrypted state.
--properties
If specified, include the dataset's properties in the stream.
Expand Down Expand Up @@ -1251,6 +1259,9 @@ $PROGNAME sync --dest <string> --source <string> [OPTIONS]\n
zstd_compress or large_blocks are in use by the source, they need to be enabled on
the target as well.
--encrypted
If specified, send data in raw encrypted state.
--properties
If specified, include the dataset's properties in the stream.
Expand Down

0 comments on commit 85dd28c

Please sign in to comment.