Skip to content

Commit 17d4cd1

Browse files
committed
backup: Show VM index in log
1 parent 9eafc3e commit 17d4cd1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/dstack-backup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,15 @@ def run(self):
377377
logger.info("No running VMs found")
378378
return
379379

380+
total_vms = len(vms)
380381
# Process each VM
381-
for vm in vms:
382+
for i, vm in enumerate(vms):
382383
vm_id = vm['id']
383384
vm_name = vm['name']
384385
hd = vm['hd']
385386

386387
logger.info("-" * 50)
387-
logger.info(f"Processing VM: {vm_name} ({vm_id})")
388+
logger.info(f"[{i+1}/{total_vms}] Processing VM: {vm_name} ({vm_id})")
388389

389390
# Check if backup is needed
390391
backup_type = self.needs_backup(vm_id)

0 commit comments

Comments
 (0)