pub struct BackupCmd {Show 22 fields
cli_sources: Vec<String>,
cli_name: Vec<String>,
name: Option<String>,
stdin_filename: String,
stdin_command: Option<CommandInput>,
as_path: Option<PathBuf>,
pub no_scan: bool,
json: bool,
long: bool,
init: bool,
ignore_save_opts: LocalSourceSaveOptions,
parent_opts: ParentOptions,
excludes: Excludes,
ignore_filter_opts: LocalSourceFilterOptions,
snap_opts: SnapshotOptions,
key_opts: KeyOptions,
config_opts: ConfigOptions,
hooks: Hooks,
snapshots: Vec<Self>,
sources: Vec<String>,
pub metrics_job: Option<String>,
metrics_labels: BTreeMap<String, String>,
}Expand description
backup subcommand
Fields§
§cli_sources: Vec<String>Backup source (can be specified multiple times), use - for stdin. If no source is given, uses all sources defined in the config file
cli_name: Vec<String>Backup sources defined in the config profile by the given name (can be specified multiple times)
name: Option<String>§stdin_filename: StringSet filename to be used when backing up from stdin
stdin_command: Option<CommandInput>Start the given command and use its output as stdin
as_path: Option<PathBuf>Manually set backup path in snapshot
no_scan: boolDon’t scan the backup source for its size - this disables ETA estimation for backup.
json: boolOutput generated snapshot in json format
long: boolShow detailed information about generated snapshot
init: boolInitialize repository, if it doesn’t exist yet
ignore_save_opts: LocalSourceSaveOptionsNode save options
parent_opts: ParentOptionsParent processing options
excludes: ExcludesExclude options
ignore_filter_opts: LocalSourceFilterOptionsExclude options for local source
snap_opts: SnapshotOptionsSnapshot options
key_opts: KeyOptionsKey options (when using –init)
config_opts: ConfigOptionsConfig options (when using –init)
hooks: HooksHooks to use
snapshots: Vec<Self>Backup snapshots to generate
sources: Vec<String>Backup source, used within config file
metrics_job: Option<String>Job name for the metrics. Default: rustic-backup
metrics_labels: BTreeMap<String, String>Additional labels to set to generated metrics
Implementations§
Source§impl BackupCmd
impl BackupCmd
fn inner_run(&self, repo: Repo) -> Result<()>
fn get_snapshots_to_backup(&self) -> Result<Vec<(Self, PathList)>>
fn hooks(&self, hooks: &Hooks, action: &str, source: impl Display) -> Hooks
fn backup_snapshot( self, source: PathList, repo: &Repository<IndexedIdsStatus>, ) -> Result<()>
Trait Implementations§
Source§impl Args for BackupCmd
impl Args for BackupCmd
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Command for BackupCmd
impl Command for BackupCmd
Source§fn description() -> &'static str
fn description() -> &'static str
Description of this program
Authors of this program
Source§fn parse_args<T, I>(into_args: I) -> Self
fn parse_args<T, I>(into_args: I) -> Self
Source§fn parse_env_args() -> Selfwhere
Self: Parser,
fn parse_env_args() -> Selfwhere
Self: Parser,
Source§impl CommandFactory for BackupCmd
impl CommandFactory for BackupCmd
Source§impl<'de> Deserialize<'de> for BackupCmd
impl<'de> Deserialize<'de> for BackupCmd
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromArgMatches for BackupCmd
impl FromArgMatches for BackupCmd
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for BackupCmd
impl Parser for BackupCmd
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for BackupCmd
impl RefUnwindSafe for BackupCmd
impl Send for BackupCmd
impl Sync for BackupCmd
impl Unpin for BackupCmd
impl UnsafeUnpin for BackupCmd
impl UnwindSafe for BackupCmd
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C> Config for C
impl<C> Config for C
Source§fn load_toml(toml_string: impl AsRef<str>) -> Result<C, FrameworkError>
fn load_toml(toml_string: impl AsRef<str>) -> Result<C, FrameworkError>
Source§fn load_toml_file(path: impl AsRef<CanonicalPath>) -> Result<C, FrameworkError>
fn load_toml_file(path: impl AsRef<CanonicalPath>) -> Result<C, FrameworkError>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more