pinakes-core: clarify backup support for postgresql
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I7f7d5dcb1d973c8615aacbfc0a5a44576a6a6964
This commit is contained in:
parent
8023dc606b
commit
e15dad208e
1 changed files with 7 additions and 3 deletions
|
|
@ -1171,11 +1171,15 @@ pub trait StorageBackend: Send + Sync + 'static {
|
||||||
async fn count_unresolved_links(&self) -> Result<u64>;
|
async fn count_unresolved_links(&self) -> Result<u64>;
|
||||||
|
|
||||||
/// Create a backup of the database to the specified path.
|
/// Create a backup of the database to the specified path.
|
||||||
/// Default implementation returns unsupported; `SQLite` overrides with
|
///
|
||||||
/// VACUUM INTO.
|
/// Only supported for SQLite (uses VACUUM INTO). PostgreSQL
|
||||||
|
/// deployments should use `pg_dump` directly; this method returns
|
||||||
|
/// `PinakesError::InvalidOperation` for unsupported backends.
|
||||||
async fn backup(&self, _dest: &std::path::Path) -> Result<()> {
|
async fn backup(&self, _dest: &std::path::Path) -> Result<()> {
|
||||||
Err(crate::error::PinakesError::InvalidOperation(
|
Err(crate::error::PinakesError::InvalidOperation(
|
||||||
"backup not supported for this storage backend".to_string(),
|
"backup not supported for this storage backend; use pg_dump for \
|
||||||
|
PostgreSQL"
|
||||||
|
.to_string(),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue