Compare commits

...

6 Commits

Author SHA1 Message Date
Orsiris de Jong 86010c1773
Merge 0f98814efd into 940a84e21f 2025-06-16 22:39:22 -05:00
Jim Salter 940a84e21f
Merge pull request #1008 from aabccd021/master
Fix readme formatting
2025-06-12 09:53:57 -04:00
aabccd021 680194fa33 Fix readme formatting 2025-06-12 12:58:26 +07:00
Orsiris de Jong 0f98814efd
Improve comment about zstd core limit 2025-04-29 16:52:38 +02:00
Orsiris de Jong 2c009be6ce
add zstd-medium compression parameter 2025-04-29 16:52:20 +02:00
Orsiris de Jong d3ad1caa15
Allow threaded zstd usage 2025-04-29 15:16:57 +02:00
2 changed files with 20 additions and 10 deletions

View File

@ -330,6 +330,7 @@ As of 1.4.18, syncoid also automatically supports and enables resume of interrup
This argument tells syncoid to create a zfs bookmark for the newest snapshot after it got replicated successfully. The bookmark name will be equal to the snapshot name. Only works in combination with the --no-sync-snap option. This can be very useful for irregular replication where the last matching snapshot on the source was already deleted but the bookmark remains so a replication is still possible.
+ --use-hold
This argument tells syncoid to add a hold to the newest snapshot on the source and target after replication succeeds and to remove the hold after the next successful replication. Setting a hold prevents the snapshots from being destroyed. The hold name includes the identifier if set. This allows for separate holds in case of replication to multiple targets.
+ --preserve-recordsize

29
syncoid
View File

@ -17,6 +17,9 @@ use Capture::Tiny ':all';
my $mbuffer_size = "16M";
my $pvoptions = "-p -t -e -r -b";
# Get number of CPUs for zstd threading, but leave at least two cores empty for system responsiveness
my $ncpus = int(`nproc`);
if ($ncpus > 2) { $ncpus -= 2;}
# Blank defaults to use ssh client's default
# TODO: Merge into a single "sshflags" option?
@ -1141,10 +1144,16 @@ sub compressargset {
decomargs => '-dc',
},
'zstd-fast' => {
rawcmd => 'zstd',
args => '-3',
decomrawcmd => 'zstd',
decomargs => '-dc',
rawcmd => 'zstd',
args => "-T$ncpus -3",
decomrawcmd => 'zstd',
decomargs => "-T$ncpus -dc",
},
'zstd-medium' => {
rawcmd => 'zstd',
args => "-T$ncpus -8",
decomrawcmd => 'zstd',
decomargs => "-T$ncpus -dc",
},
'zstdmt-fast' => {
rawcmd => 'zstdmt',
@ -1153,10 +1162,10 @@ sub compressargset {
decomargs => '-dc',
},
'zstd-slow' => {
rawcmd => 'zstd',
args => '-19',
decomrawcmd => 'zstd',
decomargs => '-dc',
rawcmd => 'zstd',
args => "-T$ncpus -19",
decomrawcmd => 'zstd',
decomargs => "-T$ncpus -dc",
},
'zstdmt-slow' => {
rawcmd => 'zstdmt',
@ -1186,7 +1195,7 @@ sub compressargset {
if ($value eq 'default') {
$value = $DEFAULT_COMPRESSION;
} elsif (!(grep $value eq $_, ('gzip', 'pigz-fast', 'pigz-slow', 'zstd-fast', 'zstdmt-fast', 'zstd-slow', 'zstdmt-slow', 'lz4', 'xz', 'lzo', 'default', 'none'))) {
} elsif (!(grep $value eq $_, ('gzip', 'pigz-fast', 'pigz-slow', 'zstd-fast', 'zstd-medium', 'zstdmt-fast', 'zstd-slow', 'zstdmt-slow', 'lz4', 'xz', 'lzo', 'default', 'none'))) {
writelog('WARN', "Unrecognised compression value $value, defaulting to $DEFAULT_COMPRESSION");
$value = $DEFAULT_COMPRESSION;
}
@ -2400,7 +2409,7 @@ syncoid - ZFS snapshot replication tool
Options:
--compress=FORMAT Compresses data during transfer. Currently accepted options are gzip, pigz-fast, pigz-slow, zstd-fast, zstdmt-fast, zstd-slow, zstdmt-slow, lz4, xz, lzo (default) & none
--compress=FORMAT Compresses data during transfer. Currently accepted options are gzip, pigz-fast, pigz-slow, zstd-fast, zstd-medium, zstdmt-fast, zstd-slow, zstdmt-slow, lz4, xz, lzo (default) & none
--identifier=EXTRA Extra identifier which is included in the snapshot name. Can be used for replicating to multiple targets.
--recursive|r Also transfers child datasets
--skip-parent Skips syncing of the parent dataset. Does nothing without '--recursive' option.