Skip to main content

SnapCommand

Enum SnapCommand 

Source
pub enum SnapCommand {
Show 13 variants List { path: Option<String>, json: bool, }, Show { timestamp: String, }, Revert { path: String, epoch: u64, }, Copy { path: String, epoch: u64, destination: String, }, Prune { older_than: Option<String>, keep_last: Option<usize>, max_size: Option<String>, path: String, }, Tag { timestamp: String, tag: String, }, RebuildIndex { path: String, }, Stats { path: String, json: bool, }, Export { path: String, output: Option<String>, compress: String, timestamp: Option<String>, format: String, include_vectors: bool, from_cas: bool, }, Import { path: String, input: Option<String>, compress: String, generate_sigs: bool, raw: bool, verbose: bool, to_cas: bool, }, Inspect { archive: String, list: bool, json: bool, file: Option<String>, }, Restore { archive: String, file: Option<String>, date: Option<String>, latest: bool, all_versions: bool, output: String, }, Browse { path: String, ai: bool, },
}

Variants§

§

List

List snapshots or versions of a specific file

Fields

§path: Option<String>

Target directory or specific file path

§json: bool

Output as JSON (machine-readable)

§

Show

Show details of a specific snapshot

Fields

§timestamp: String
§

Revert

Revert a file to a previous version (atomic reflink swap)

Fields

§path: String
§epoch: u64
§

Copy

Copy a specific version to a new file

Fields

§path: String
§epoch: u64
§destination: String
§

Prune

Remove old snapshots by age, count, or size

Fields

§older_than: Option<String>

Delete snapshots older than this duration (e.g. 30d, 7d, 24h)

§keep_last: Option<usize>

Keep only the last N snapshots

§max_size: Option<String>

Delete oldest until total size is under this limit (e.g. 50G, 10G)

§path: String

Target directory containing .foxing_versions

§

Tag

Tag a snapshot (tagged snapshots are exempt from auto-pruning)

Fields

§timestamp: String
§

RebuildIndex

Rebuild index.json from on-disk snapshot state

Fields

§path: String

Target directory containing .foxing_versions

§

Stats

Show aggregate storage statistics (apparent vs on-disk, CoW savings)

Fields

§path: String

Target directory containing .foxing_versions

§json: bool

Output as JSON

§

Export

Export snapshots as a .fxar archive (content-addressable, deduped)

Fields

§path: String

Source directory containing .foxing_versions or .foxing_cas

§output: Option<String>

Output file (default: stdout)

§compress: String

Compression: zstd (default), zstd:N, lz4, gzip, xz, xz:N, none

§timestamp: Option<String>

Export only a specific snapshot timestamp

§format: String

Archive format: fxar2 (default, chunk-dedup) or tar (legacy whole-file)

§include_vectors: bool

Bundle .foxing_index/ AI sections (embeddings, HNSW) into the archive

§from_cas: bool

Export from .foxing_cas/ CAS store instead of .foxing_versions/

§

Import

Import snapshots from a .fxar archive

Fields

§path: String

Target directory to restore into

§input: Option<String>

Input file (default: stdin)

§compress: String

Decompression: auto (default), zstd, lz4, gzip, xz, none

§generate_sigs: bool

Generate foxingd-compatible signatures for fast incremental sync

§raw: bool

Preserve raw snapshot/tree/ path structure (default: extract latest version with flat paths)

§verbose: bool

Show per-file version info during extraction

§to_cas: bool

Import into .foxing_cas/ CAS store (filesystem-agnostic, no xattr needed)

§

Inspect

Inspect a .fxar archive without extracting

Fields

§archive: String

Archive file

§list: bool

Show full file listing

§json: bool

Output as JSON

§file: Option<String>

Show versions of a specific file

§

Restore

Restore specific files/snapshots from a .fxar archive

Fields

§archive: String

Archive file

§file: Option<String>

File path pattern to restore (glob)

§date: Option<String>

Snapshot date to restore from (prefix match)

§latest: bool

Restore most recent version

§all_versions: bool

Restore all versions of matched files

§output: String

Output directory

§

Browse

Interactive MC-style dual-pane browser for snapshots and archives

Fields

§path: String

Directory with .foxing_versions or .fxar archive file

§ai: bool

Load AI index from archive for vector search (requires –features ai)

Trait Implementations§

Source§

impl FromArgMatches for SnapCommand

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<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for SnapCommand

Source§

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

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

fn augment_subcommands_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§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more