This commit is contained in:
JMARyA 2025-01-05 00:37:20 +01:00
commit b416507e4a
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
8 changed files with 326 additions and 0 deletions

29
src/config.rs Normal file
View file

@ -0,0 +1,29 @@
use serde::Deserialize;
#[derive(Debug, Clone, Deserialize)]
pub struct Config {
/// Run a script before backup
pub start_script: Option<String>,
// Run a script after backup
pub end_script: Option<String>,
pub rsync: Option<Vec<RsyncConfig>>,
pub borg: Option<Vec<BorgConfig>>,
}
#[derive(Debug, Clone, Deserialize)]
pub struct RsyncConfig {
pub src: String,
pub dest: String,
pub exclude: Option<Vec<String>>,
pub delete: Option<bool>,
pub ensure_exists: Option<String>,
}
#[derive(Debug, Clone, Deserialize)]
pub struct BorgConfig {
pub repo: String,
pub passphrase: Option<String>,
pub src: Vec<String>,
}