pub struct VolumeBackups { /* private fields */ }Expand description
Every org’s volume snapshots and staged restores.
Implementations§
Source§impl VolumeBackups
impl VolumeBackups
Sourcepub fn restore(
&self,
org: &OrgId,
req: VolumeRestoreRequest,
by: &str,
) -> Result<(Run, Staged)>
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.
Sourcepub fn staged_list(
&self,
org: &OrgId,
volume: Option<&str>,
) -> Result<Vec<StagedRestore>>
pub fn staged_list( &self, org: &OrgId, volume: Option<&str>, ) -> Result<Vec<StagedRestore>>
The org’s staged restores (of volume, or all).
Source§impl VolumeBackups
impl VolumeBackups
pub fn new(state: &Path, apps: Apps, backups: Backups) -> VolumeBackups
pub fn set_scheduler(&self, s: Scheduler)
pub fn backups(&self) -> &Backups
Sourcepub fn configured(&self, org: &OrgId) -> Vec<String>
pub fn configured(&self, org: &OrgId) -> Vec<String>
Volumes with stored settings.
pub fn record(&self, org: &OrgId, volume: &str) -> Result<Option<VolumeRecord>>
Sourcepub fn info(&self, org: &OrgId, volume: &str) -> Result<VolumeInfo>
pub fn info(&self, org: &OrgId, volume: &str) -> Result<VolumeInfo>
The volume as incus has it (it must exist in the org).
Sourcepub fn update(
&self,
org: &OrgId,
volume: &str,
patch: &Value,
) -> Result<VolumeRecord>
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).
pub fn next_run(&self, r: &VolumeRecord) -> Option<i64>
Sourcepub fn snapshots(&self, org: &OrgId, volume: &str) -> Result<Vec<Snapshot>>
pub fn snapshots(&self, org: &OrgId, volume: &str) -> Result<Vec<Snapshot>>
Snapshots, newest first.
pub fn snapshot_delete( &self, org: &OrgId, volume: &str, snapshot: &str, ) -> Result<()>
Trait Implementations§
Source§impl Clone for VolumeBackups
impl Clone for VolumeBackups
Auto Trait Implementations§
impl !RefUnwindSafe for VolumeBackups
impl !UnwindSafe for VolumeBackups
impl Freeze for VolumeBackups
impl Send for VolumeBackups
impl Sync for VolumeBackups
impl Unpin for VolumeBackups
impl UnsafeUnpin for VolumeBackups
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
Mutably borrows from an owned value. Read more