add database backup with admin commands

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-03-19 04:37:35 -07:00 committed by June
parent ece817c562
commit fa942aedd7
8 changed files with 144 additions and 2 deletions

View file

@ -1,4 +1,5 @@
use std::collections::BTreeMap;
use std::error::Error;
use async_trait::async_trait;
use ruma::{
@ -32,4 +33,6 @@ pub trait Data: Send + Sync {
fn signing_keys_for(&self, origin: &ServerName) -> Result<BTreeMap<OwnedServerSigningKeyId, VerifyKey>>;
fn database_version(&self) -> Result<u64>;
fn bump_database_version(&self, new_version: u64) -> Result<()>;
fn backup(&self) -> Result<(), Box<dyn Error>> { unimplemented!() }
fn backup_list(&self) -> Result<String> { Ok(String::new()) }
}