diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-12-23 09:09:35 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-12-23 09:09:35 +0000 |
commit | 0967052ec4d6dfbd428a1c0027990f9c2610c040 (patch) | |
tree | d631425a1d1332280cc327074cfa87f465c5dfab | |
parent | 8f98fb2c4fcee7310985c011cc7f8fe6153c09bb (diff) | |
parent | 543614a33aad1646cbb25af323e8374c88912203 (diff) | |
download | obnam2-0967052ec4d6dfbd428a1c0027990f9c2610c040.tar.gz |
Merge branch 'progress' into 'main'
feat: re-enable progress bars for backup and restore
See merge request larswirzenius/obnam!42
-rw-r--r-- | client.yaml | 2 | ||||
-rw-r--r-- | src/cmd/backup.rs | 2 | ||||
-rw-r--r-- | src/cmd/restore.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/client.yaml b/client.yaml index da46287..2bc88a1 100644 --- a/client.yaml +++ b/client.yaml @@ -1,3 +1,3 @@ server_url: https://localhost:8888/chunks -root: /home/liw/pers/obnam/git/live +root: /home/liw/tmp/Foton log: obnam.log diff --git a/src/cmd/backup.rs b/src/cmd/backup.rs index 178684f..3303566 100644 --- a/src/cmd/backup.rs +++ b/src/cmd/backup.rs @@ -23,7 +23,7 @@ pub fn backup(config: &ClientConfig, buffer_size: usize) -> anyhow::Result<()> { // The fetching is in its own block so that the file handles // get closed and data flushed to disk. let mut gen = Generation::create(&dbname)?; - let progress = create_progress_bar(GUESS_FILE_COUNT, false); + let progress = create_progress_bar(GUESS_FILE_COUNT, true); progress.enable_steady_tick(100); gen.insert_iter(FsIterator::new(&config.root).map(|entry| { progress.inc(1); diff --git a/src/cmd/restore.rs b/src/cmd/restore.rs index 791bebf..b4a8f2b 100644 --- a/src/cmd/restore.rs +++ b/src/cmd/restore.rs @@ -39,7 +39,7 @@ pub fn restore(config: &ClientConfig, gen_id: &str, to: &Path) -> anyhow::Result let gen = Generation::open(&dbname)?; info!("restore file count: {}", gen.file_count()); - let progress = create_progress_bar(gen.file_count(), false); + let progress = create_progress_bar(gen.file_count(), true); for (fileid, entry) in gen.files()? { restore_generation(&client, &gen, fileid, &entry, &to, &progress)?; } |