mirror of https://github.com/jimsalterjrs/sanoid
Compare commits
6 Commits
f2aa40212d
...
86010c1773
| Author | SHA1 | Date |
|---|---|---|
|
|
86010c1773 | |
|
|
940a84e21f | |
|
|
680194fa33 | |
|
|
0f98814efd | |
|
|
2c009be6ce | |
|
|
d3ad1caa15 |
|
|
@ -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
29
syncoid
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue