mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Bugfix/disk info (#770)
* use df for getting disk info * fix import * fix type errors * add duplicity flag for different source hosts * fix borrow * reorder args * update cargo lock * use 1byte block sizes and using floating point numbers
This commit is contained in:
@@ -24,18 +24,19 @@ pub fn create_backup(
|
||||
data_path
|
||||
.join(exclude.to_string().trim_start_matches('!'))
|
||||
.display()
|
||||
));
|
||||
)).arg("--allow-source-mismatch");
|
||||
} else {
|
||||
data_cmd.arg(format!(
|
||||
"--exclude={}",
|
||||
data_path.join(exclude.to_string()).display()
|
||||
));
|
||||
)).arg("--allow-source-mismatch");
|
||||
}
|
||||
}
|
||||
let data_output = data_cmd
|
||||
.env("PASSPHRASE", DEFAULT_PASSWORD)
|
||||
.arg(data_path)
|
||||
.arg(format!("file://{}", mountpoint.display().to_string()))
|
||||
.arg("--allow-source-mismatch")
|
||||
.stderr(Stdio::piped())
|
||||
.output()?;
|
||||
if !data_output.status.success() {
|
||||
@@ -56,6 +57,7 @@ pub fn restore_backup(
|
||||
let data_path = std::fs::canonicalize(data_path)?;
|
||||
|
||||
let data_output = std::process::Command::new("duplicity")
|
||||
.arg("--allow-source-mismatch")
|
||||
.env("PASSPHRASE", DEFAULT_PASSWORD)
|
||||
.arg("--force")
|
||||
.arg(format!("file://{}", mountpoint.display().to_string()))
|
||||
|
||||
Reference in New Issue
Block a user