Args

Struct Args 

Source
pub struct Args {
Show 48 fields pub compress: Compress, pub identifier: Option<String>, pub recursive: bool, pub skip_parent: bool, pub source_bwlimit: Option<Bytes>, pub target_bwlimit: Option<Bytes>, pub mbuffer_size: String, pub pv_options: String, pub no_stream: bool, pub timestamp_format: String, pub no_sync_snap: bool, pub keep_sync_snap: bool, pub create_bookmark: bool, pub syncoid_bookmarks: bool, pub syncoid_sync_check: bool, pub prune_formats: Vec<String>, pub use_hold: String, pub preserve_recordsize: bool, pub preserve_properties: bool, pub no_rollback: bool, pub delete_target_snapshots: bool, pub exclude_datasets: Vec<Regex>, pub exclude_snaps: Vec<Regex>, pub include_snaps: Vec<Regex>, pub use_bookmarks: String, pub max_bookmarks: Option<NonZero<usize>>, pub send_options: Opts<Vec<OptionsLine<String>>>, pub recv_options: Opts<Vec<OptionsLine<String>>>, pub ssh_cipher: Option<String>, pub ssh_port: Option<String>, pub ssh_config: Option<String>, pub ssh_identity: Option<String>, pub ssh_options: Vec<String>, pub debug: bool, pub quiet: bool, pub dump_snaps: bool, pub no_command_checks: bool, pub skip_optional_commands: HashSet<&'static str>, pub dry_run: bool, pub no_resume: bool, pub no_clone_handling: bool, pub no_privilege_elevation: bool, pub source_host: Option<String>, pub target_host: Option<String>, pub force_delete: bool, pub no_recv_check_start: bool, pub source: String, pub target: String,
}

Fields§

§compress: Compress

Compresses data during transfer. Currently accepted options are gzip, pigz-fast, pigz-slow, zstd-fast, zstdmt-fast, zstd-slow, zstdmt-slow, lz4, xz, lzo & none

§identifier: Option<String>

Extra identifier which is included in the snapshot name. Can be used for replicating to multiple targets.

§recursive: bool

Also transfers child datasets

§skip_parent: bool

Skips syncing of the parent dataset. Does nothing without ‘–recursive’ option.

§source_bwlimit: Option<Bytes>

Bandwidth limit in bytes/kbytes/etc per second on the source transfer

§target_bwlimit: Option<Bytes>

Bandwidth limit in bytes/kbytes/etc per second on the target transfer

§mbuffer_size: String

Specify the mbuffer size, please refer to mbuffer(1) manual page.

§pv_options: String

Configure how pv displays the progress bar

§no_stream: bool

Replicates using newest snapshot instead of intermediates

§timestamp_format: String

Timestamp format. All invalid characters in the format will be dropped. Formatting details can be found in the chrono::format::strftime documentation.

§no_sync_snap: bool

Does not create new snapshot, only transfers existing

§keep_sync_snap: bool

Does not prune sync snaps at the end of transfers

§create_bookmark: bool

Creates a zfs bookmark for the newest snapshot on source after replication succeeds. Unless –syncoid-bookmarks is set, the bookmark name includes the identifier if set.

§syncoid_bookmarks: bool

Use the sanoid/syncoid 2.3 bookmark behaviour. This should be treated as an experinmental feature, and may not be kept in future minor revisions.

§syncoid_sync_check: bool

Use “syncoid:sync” property to check if we should sync sync. This should be treated as an experinmental feature, and may not be kept in future minor revisions.

§prune_formats: Vec<String>

If transfer creates new sync snaps, this option chooses what kind of snapshot formats to prune at the end of transfers. Current options are syncoid and chithi. Needs to be passed multiple times for multiple formats.

§use_hold: String

Adds a hold to the newest snapshot on the source and target after replication and removes the hold after the next successful replication. The hold name includes the identifier if set. This allows for separate holds in case of multiple targets. Can be optionally passed the value “syncoid” to make syncoid compatible holds.

§preserve_recordsize: bool

Preserves the recordsize on inital sends to the target

§preserve_properties: bool

Preserves locally set dataset properties similar to the zfs send -p flag, but will also work for encrypted datasets in non raw sends. Properties are manually fetched on the source and manually written to on the target, with a blacklist of properties that cannot be written.

§no_rollback: bool

Does not rollback snapshots on target (it probably requires a readonly target)

§delete_target_snapshots: bool

With this argument, snapshots which are missing on the source will be destroyed on the target. Use this if you only want to handle snapshots on the source.

§exclude_datasets: Vec<Regex>

Exclude specific datasets that match the given regular expression. Can be specified multiple times.

§exclude_snaps: Vec<Regex>

Exclude specific snapshots that match the given regular expression. Can be specified multiple times. If a snapshot matches both exclude-snaps and include-snaps patterns, then it will be excluded.

§include_snaps: Vec<Regex>

Only include snapshots that match the given regular expression. Can be specified multiple times. If a snapshot matches both exclude-snaps and include-snaps patterns, then it will be excluded.

§use_bookmarks: String

Use bookmarks for incremental syncing. When set to “always” (assumed if no value is passed), we fetch bookmarks as well as snapshots when computing incremental sends.

§max_bookmarks: Option<NonZero<usize>>

Prune bookmarks. Bookmarks are not

§send_options: Opts<Vec<OptionsLine<String>>>

Use advanced options for zfs send (the arguments are filtered as needed), e.g. chithi –send-options=“Lc e” sets zfs send -L -c -e …

§recv_options: Opts<Vec<OptionsLine<String>>>

Use advanced options for zfs receive (the arguments are filtered as needed), e.g. chithi –recv-options=“ux recordsize o compression=lz4” sets zfs receive -u -x recordsize -o compression=lz4 …

§ssh_cipher: Option<String>

Passes CIPHER to ssh to use a particular cipher set.

§ssh_port: Option<String>

Connects to remote machines on a particular port.

§ssh_config: Option<String>

Uses config FILE for connecting to remote machines over ssh.

§ssh_identity: Option<String>

Uses identity FILE to connect to remote machines over ssh.

§ssh_options: Vec<String>

Passes OPTION to ssh for remote usage. Can be specified multiple times

§debug: bool

Prints out a lot of additional information during a chithi run. Logs overridden by –quiet and RUST_LOG environment variable

§quiet: bool

Supresses non-error output and progress bars. Logs overridden by RUST_LOG environment variable

§dump_snaps: bool

Dumps a list of snapshots during the run

§no_command_checks: bool

Passes OPTION to ssh for remote usage. Can be specified multiple times

§skip_optional_commands: HashSet<&'static str>

A comma separated list of optional commands to skip. Current values are: sourcepv localpv targetpv compress localcompress sourcembuffer targetmbuffer localmbuffer

§dry_run: bool

Do a dry run, without modifying datasets and pools. The dry run functionality is provided on a best effort basis and may break between minor versions.

§no_resume: bool

Don’t use the ZFS resume feature if available

§no_clone_handling: bool

Don’t try to recreate clones on target. Clone handling is done by deferring child datasets that are clones to a second pass of syncing, so this flag is not meaningful without the –recursive flag.

§no_privilege_elevation: bool

Bypass the root check, for use with ZFS permission delegation

§source_host: Option<String>

Manually specifying source host (and user)

§target_host: Option<String>

Manually specifying target host (and user)

§force_delete: bool

Remove target datasets recursively if there are no matching snapshots/bookmarks (also overwrites conflicting named snapshots)

§no_recv_check_start: bool

Prevents the recursive recv check at the start of the sync

§source: String§target: String

Implementations§

Source§

impl Args

Source

pub fn clone_handling(&self) -> bool

Source

pub fn recv_check_start(&self) -> bool

Source

pub fn optional_enabled(&self, optional: &'static str) -> bool

Source

pub fn get_pv_options(&self) -> Vec<OsString>

Source

pub fn get_source_mbuffer_args(&self) -> Vec<OsString>

Source

pub fn get_target_mbuffer_args(&self) -> Vec<OsString>

Source

pub fn get_timestamp(&self) -> String

Source

pub fn direct_connection(&self) -> bool

Returns false for now. In the future, we might allow direct ssh/tls (or even insecure tcp) connections between remote hosts.

Trait Implementations§

Source§

impl Args for Args

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl CommandFactory for Args

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for Args

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Args

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for Args

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Args

§

impl RefUnwindSafe for Args

§

impl Send for Args

§

impl Sync for Args

§

impl Unpin for Args

§

impl UnwindSafe for Args

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V