summaryrefslogtreecommitdiffstats
path: root/backup/src/main.rs
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2025-04-13 05:00:04 +0200
committerLeonard Kugis <leonard@kug.is>2025-04-13 05:00:04 +0200
commitef16a7e14213498a35a77664ec8e4e5cecaa584d (patch)
tree14abbf9f93db8b05814eee5845859ae92da3ecd7 /backup/src/main.rs
parent552442a52ed264de155b5dcc2269abba6ead5a99 (diff)
downloadscripts-ef16a7e14213498a35a77664ec8e4e5cecaa584d.tar.gz
backup: Fixed tar argument order
Diffstat (limited to 'backup/src/main.rs')
-rw-r--r--backup/src/main.rs16
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);
}