mirror of https://github.com/borgbackup/borg.git
cache sync: show progress indication
sync can take quite long, so show what we are doing.
This commit is contained in:
parent
cce0d20dad
commit
35b0f38f5c
|
@ -306,10 +306,15 @@ class Cache:
|
|||
chunk_idx.clear()
|
||||
for tarinfo in tf_in:
|
||||
archive_id_hex = tarinfo.name
|
||||
archive_name = tarinfo.pax_headers['archive_name']
|
||||
print("- processing archive: %s -> extract, " % archive_name, end='') ; sys.stdout.flush()
|
||||
tf_in.extract(archive_id_hex, tmp_dir)
|
||||
chunk_idx_path = os.path.join(tmp_dir, archive_id_hex).encode('utf-8')
|
||||
print("read, ", end='') ; sys.stdout.flush()
|
||||
archive_chunk_idx = ChunkIndex.read(chunk_idx_path)
|
||||
print("merge, ", end='') ; sys.stdout.flush()
|
||||
chunk_idx.merge(archive_chunk_idx)
|
||||
print("done.")
|
||||
os.unlink(chunk_idx_path)
|
||||
|
||||
self.begin_txn()
|
||||
|
|
Loading…
Reference in New Issue