pub struct PointInTimeRecovery { /* private fields */ }
Expand description
Point-in-Time Recovery (PITR) manager for database recovery operations
Implementations§
Source§impl PointInTimeRecovery
impl PointInTimeRecovery
pub fn new(config: BackupConfig, db_pool: Arc<PgPool>) -> Self
Sourcepub async fn initialize(&self) -> Result<()>
pub async fn initialize(&self) -> Result<()>
Initialize the PITR system
Sourcepub async fn create_recovery_plan(
&self,
recovery_options: &RecoveryOptions,
data_directory: PathBuf,
) -> Result<RecoveryPlan>
pub async fn create_recovery_plan( &self, recovery_options: &RecoveryOptions, data_directory: PathBuf, ) -> Result<RecoveryPlan>
Create a recovery plan for the specified target
Sourcepub async fn execute_recovery(&self, recovery_plan: RecoveryPlan) -> Result<()>
pub async fn execute_recovery(&self, recovery_plan: RecoveryPlan) -> Result<()>
Execute a point-in-time recovery
Sourcepub async fn validate_recovery_target(
&self,
recovery_options: &RecoveryOptions,
) -> Result<bool>
pub async fn validate_recovery_target( &self, recovery_options: &RecoveryOptions, ) -> Result<bool>
Validate that a recovery is possible to the specified target
Sourcepub async fn get_recovery_status(&self) -> RecoveryStatus
pub async fn get_recovery_status(&self) -> RecoveryStatus
Get current recovery status
Sourcepub async fn cancel_recovery(&self) -> Result<()>
pub async fn cancel_recovery(&self) -> Result<()>
Cancel an ongoing recovery operation
Sourcepub async fn test_recovery(
&self,
recovery_options: &RecoveryOptions,
) -> Result<RecoveryTestResult>
pub async fn test_recovery( &self, recovery_options: &RecoveryOptions, ) -> Result<RecoveryTestResult>
Test recovery procedure without actually performing recovery
Auto Trait Implementations§
impl Freeze for PointInTimeRecovery
impl !RefUnwindSafe for PointInTimeRecovery
impl Send for PointInTimeRecovery
impl Sync for PointInTimeRecovery
impl Unpin for PointInTimeRecovery
impl !UnwindSafe for PointInTimeRecovery
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
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>
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 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>
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