pub struct WalArchiver { /* private fields */ }Expand description
WAL (Write-Ahead Log) archiver for continuous backup capability
Implementations§
Source§impl WalArchiver
impl WalArchiver
pub fn new(config: BackupConfig, db_pool: Arc<PgPool>) -> Self
Sourcepub async fn initialize(&self) -> Result<()>
pub async fn initialize(&self) -> Result<()>
Initialize WAL archiving
Sourcepub async fn start_archiving(&self) -> Result<()>
pub async fn start_archiving(&self) -> Result<()>
Start continuous WAL archiving
Sourcepub async fn stop_archiving(&self) -> Result<()>
pub async fn stop_archiving(&self) -> Result<()>
Stop WAL archiving
Sourcepub async fn archive_wal_file(
&self,
wal_filename: &str,
wal_path: &Path,
) -> Result<WalFile>
pub async fn archive_wal_file( &self, wal_filename: &str, wal_path: &Path, ) -> Result<WalFile>
Archive a specific WAL file
Sourcepub async fn get_archived_wal_files(&self) -> Result<Vec<WalFile>>
pub async fn get_archived_wal_files(&self) -> Result<Vec<WalFile>>
Get list of archived WAL files
Sourcepub async fn cleanup_old_wal_files(&self) -> Result<u32>
pub async fn cleanup_old_wal_files(&self) -> Result<u32>
Clean up old WAL archives based on retention policy
Sourcepub async fn get_archive_status(&self) -> ArchiveStatus
pub async fn get_archive_status(&self) -> ArchiveStatus
Get current archive status
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalArchiver
impl !RefUnwindSafe for WalArchiver
impl Send for WalArchiver
impl Sync for WalArchiver
impl Unpin for WalArchiver
impl !UnwindSafe for WalArchiver
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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