Display the final path (compressed backup) in log

This commit is contained in:
Greg Burri 2025-04-29 13:15:06 +02:00
parent 5962b13d05
commit aa7a7a23fc

View file

@ -43,11 +43,12 @@ where
"recipes_backup_{}.sqlite",
chrono::Local::now().format("%Y-%m-%d_%H%M%S")
));
let path_compressed = path.with_extension("sqlite.gz");
event!(
Level::INFO,
"Starting backup process to {}...",
path.display()
path_compressed.display()
);
if let Err(error) = db_connection.backup(&path).await {
@ -59,7 +60,6 @@ where
Ok(file_input) => {
let buf_reader = BufReader::new(file_input);
let mut encoder = GzipEncoder::new(buf_reader);
let path_compressed = path.with_extension("sqlite.gz");
match File::create(&path_compressed).await {
Ok(mut file_output) => {
if let Err(error) =