Added File remote backups

+ Copies the backup to a target directory
+ Useful for backing up to another local drive or mounted network drive
+ Various improvements
+ Fixed .drone.yml
This commit is contained in:
2021-09-19 13:56:30 -06:00
parent d207c6df19
commit 8378f2ead3
12 changed files with 70 additions and 66 deletions
+7 -6
View File
@@ -1,6 +1,6 @@
mod remote;
pub(crate) mod remote;
use crate::config::remote::{FTPConfig, SFTPConfig};
use crate::config::remote::{FTPConfig, SFTPConfig, FileConfig};
use config::{Config, ConfigError, File};
use serde::Deserialize;
use std::path::PathBuf;
@@ -39,17 +39,18 @@ pub struct WorldConfig {
#[derive(Debug, Deserialize, Clone)]
pub struct BackupConfig {
pub minecraft_dir: PathBuf,
pub output_dir: PathBuf,
pub backups_to_keep: u64,
pub backups_to_keep: usize,
pub discord_webhook: Option<String>,
pub output_config: FileConfig,
}
/// Config for remote backups
/// Config for remote_backup backups
#[derive(Debug, Deserialize, Clone)]
pub struct RemoteBackupConfig {
pub backups_to_keep: u64,
pub backups_to_keep: usize,
pub sftp: Option<SFTPConfig>,
pub ftp: Option<FTPConfig>,
pub file: Option<FileConfig>
}
/// Configs