diff --git a/src/backup/chunk_store.rs b/src/backup/chunk_store.rs index 8fede8aa..e1da5a8a 100644 --- a/src/backup/chunk_store.rs +++ b/src/backup/chunk_store.rs @@ -295,7 +295,7 @@ impl ChunkStore { for (entry, percentage) in self.get_chunk_iterator()? { if last_percentage != percentage { last_percentage = percentage; - worker.log(format!("{}%, processed {} chunks", percentage, chunk_count)); + worker.log(format!("percentage done: phase2 {}% (processed {} chunks)", percentage, chunk_count)); } worker.fail_on_abort()?; diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index 51274f99..42866e38 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -430,6 +430,12 @@ impl DataStore { let image_list = self.list_images()?; + let image_count = image_list.len(); + + let mut done = 0; + + let mut last_percentage: usize = 0; + for path in image_list { worker.fail_on_abort()?; @@ -444,6 +450,14 @@ impl DataStore { self.index_mark_used_chunks(index, &path, status, worker)?; } } + done += 1; + + let percentage = done*100/image_count; + if percentage > last_percentage { + worker.log(format!("percentage done: phase1 {}% ({} of {} index files)", + percentage, done, image_count)); + last_percentage = percentage; + } } Ok(())