diff --git a/config.toml b/config.toml index 332ab37..8c90f0b 100644 --- a/config.toml +++ b/config.toml @@ -44,9 +44,6 @@ exclude_if_present = [".nobackup"] # Stay in one filesystem one_file_system = true -# Backup access time -atime = false - # Backup change time ctime = false diff --git a/src/borg.rs b/src/borg.rs index 47112b6..8fb7de8 100644 --- a/src/borg.rs +++ b/src/borg.rs @@ -13,7 +13,9 @@ pub fn init_repo(path: &str) { pub fn create_archive(conf: &BorgConfig) { let archive_name = format!( "BK_{}_{}_{}", - std::fs::read_to_string("/etc/hostname").unwrap_or(String::from("UNKNOWN")), + std::fs::read_to_string("/etc/hostname") + .map(|x| x.trim().to_string()) + .unwrap_or(String::from("UNKNOWN")), conf.src.join("+++"), nowtime() ); @@ -44,12 +46,6 @@ pub fn create_archive(conf: &BorgConfig) { cmd.push("--one-file-system"); } - if conf.atime.unwrap_or_default() { - cmd.push("--atime"); - } else { - cmd.push("--noatime"); - } - if !conf.ctime.unwrap_or(true) { cmd.push("--noctime"); } diff --git a/src/config.rs b/src/config.rs index aa040ba..56dff47 100644 --- a/src/config.rs +++ b/src/config.rs @@ -32,7 +32,6 @@ pub struct BorgConfig { pub exclude: Option>, pub exclude_if_present: Option>, pub one_file_system: Option, - pub atime: Option, pub ctime: Option, pub no_acls: Option, pub no_xattrs: Option,