Skip to main content

VolumeBackups

Struct VolumeBackups 

Source
pub struct VolumeBackups { /* private fields */ }
Expand description

Every org’s volume snapshots and staged restores.

Implementations§

Source§

impl VolumeBackups

Source

pub fn restore( &self, org: &OrgId, req: VolumeRestoreRequest, by: &str, ) -> Result<(Run, Staged)>

Restore into a new staged volume, in the background. Returns the run and where the restore lands.

Source

pub fn staged_list( &self, org: &OrgId, volume: Option<&str>, ) -> Result<Vec<StagedRestore>>

The org’s staged restores (of volume, or all).

Source

pub fn staged_discard( &self, org: &OrgId, volume: &str, stamp: &str, ) -> Result<Value>

Detach and delete a staged restore. Refuses a volume that is not one.

Source§

impl VolumeBackups

Source

pub fn new(state: &Path, apps: Apps, backups: Backups) -> VolumeBackups

Source

pub fn set_scheduler(&self, s: Scheduler)

Source

pub fn backups(&self) -> &Backups

Source

pub fn runs(&self, org: &OrgId, volume: &str) -> RunStore

Snapshot runs of a volume.

Source

pub fn configured(&self, org: &OrgId) -> Vec<String>

Volumes with stored settings.

Source

pub fn record(&self, org: &OrgId, volume: &str) -> Result<Option<VolumeRecord>>

Source

pub fn info(&self, org: &OrgId, volume: &str) -> Result<VolumeInfo>

The volume as incus has it (it must exist in the org).

Source

pub fn update( &self, org: &OrgId, volume: &str, patch: &Value, ) -> Result<VolumeRecord>

Change a volume’s settings with a merge patch (schedule: null or "" removes the schedule).

Source

pub fn next_run(&self, r: &VolumeRecord) -> Option<i64>

Source

pub fn snapshots(&self, org: &OrgId, volume: &str) -> Result<Vec<Snapshot>>

Snapshots, newest first.

Source

pub fn snapshot_delete( &self, org: &OrgId, volume: &str, snapshot: &str, ) -> Result<()>

Source

pub fn snapshot( &self, org: &OrgId, volume: &str, name: SnapshotName, (trigger, by, slot): (RunTrigger, &str, Option<i64>), ) -> Result<Option<Run>>

Take a snapshot in the background (hook first). None when one of this volume is already being taken.

Trait Implementations§

Source§

impl Clone for VolumeBackups

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Scheduled for VolumeBackups

Source§

fn entries(&self) -> Vec<Entry>

Every enabled schedule.
Source§

fn fire(&self, e: &Entry, slot: i64, late: bool)

Record slot as the entry’s anchor, then start its run (without blocking the scheduler). The anchor must be saved before this returns, so a slot never fires twice.
Source§

fn advance(&self, e: &Entry, to: i64)

Move the anchor without running (missed beyond the grace window).

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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