diff options
Diffstat (limited to 'backup/src')
-rw-r--r-- | backup/src/main.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/backup/src/main.rs b/backup/src/main.rs index 22b573f..b5a6688 100644 --- a/backup/src/main.rs +++ b/backup/src/main.rs @@ -132,18 +132,20 @@ fn main() -> Result<(), Box<dyn Error>> { let backup_path = backup_dir.join(&backup_filename); let mut tar_cmd = Command::new("tar"); + + for excl in &exclude_args { + tar_cmd.arg(excl); + } + tar_cmd .arg("-cvp") - .arg("-g") - .arg(timestamp_file) - .arg("-f") - .arg(&backup_path) .arg("-I") .arg("zstd -9 -T1"); + .arg("-f") + .arg(&backup_path) + .arg("-g") + .arg(timestamp_file) - for excl in &exclude_args { - tar_cmd.arg(excl); - } for src in &source_paths { tar_cmd.arg(src); } |