fix(worker/mailcow): fixed path and added error message to output
Build and Deploy / build-docker (push) Successful in 4m10s
Details
Build and Deploy / build-docker (push) Successful in 4m10s
Details
This commit is contained in:
parent
6060292d9f
commit
5e95f37c12
|
@ -65,14 +65,14 @@ fn perform_backup(backup: backup::Backup) -> Result<()> {
|
||||||
create_dir_all(&tmp)?;
|
create_dir_all(&tmp)?;
|
||||||
|
|
||||||
let status = Command::new("bash")
|
let status = Command::new("bash")
|
||||||
.arg(format!("{dir}/helper-scripts/backup_and_restore.sh"))
|
.arg(format!("{dir}helper-scripts/backup_and_restore.sh"))
|
||||||
.arg("backup")
|
.arg("backup")
|
||||||
.arg("all")
|
.arg("all")
|
||||||
.env("MAILCOW_BACKUP_LOCATION", &tmp)
|
.env("MAILCOW_BACKUP_LOCATION", &tmp)
|
||||||
.status()?;
|
.status()?;
|
||||||
|
|
||||||
if !status.success() {
|
if !status.success() {
|
||||||
return Err(Error::msg("Failed to create mailcow backup}"));
|
bail!("Failed to create mailcow backup: {}", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_dir_to_archive(&mut archive, &Path::new(&tmp), "mailcow", options)?;
|
add_dir_to_archive(&mut archive, &Path::new(&tmp), "mailcow", options)?;
|
||||||
|
|
Loading…
Reference in New Issue