feat(backup): add scheduled database backups

This commit is contained in:
CSXFanMeng authored and GitHub committed 2026-07-16 18:49:15 +08:00
1 parent cc518e8753
commit f08a0b7f7f
26 files changed
+2491 -137

No files matched your search

+10 -1
View File
@@ -3,12 +3,21 @@ use tauri::{AppHandle, Emitter, State};
use crate::commands::connection::AppState;
pub use dbx_core::database_export::{DatabaseExportRequest, ExportProgress, ExportStatus};
pub use dbx_core::database_export::{DatabaseBackupSnapshot, DatabaseExportRequest, ExportProgress, ExportStatus};
fn emit_progress(app: &AppHandle, progress: ExportProgress) {
let _ = app.emit("database-export-progress", progress);
}
#[tauri::command]
pub async fn begin_database_backup_snapshot(
state: State<'_, Arc<AppState>>,
connection_id: String,
database: String,
) -> Result<DatabaseBackupSnapshot, String> {
dbx_core::database_export::begin_database_backup_snapshot_core(&state, &connection_id, &database).await
}
#[tauri::command]
pub async fn export_database_sql(
app: AppHandle,