From 87d6979d7b97bea325c4c2f27aae7c9f2d132ece Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Sun, 7 Jul 2024 16:58:01 -0400 Subject: [PATCH] skip iso --- virt-back | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/virt-back b/virt-back index a288c06..761133f 100755 --- a/virt-back +++ b/virt-back @@ -102,7 +102,7 @@ def invoke(doms, method): def backup(doms): - """Accept a list of dom objects, run backup proceedure on each""" + """Accept a list of dom objects, run backup procedure on each""" for dom in doms: recreate = dom.isActive() @@ -126,6 +126,12 @@ def backup(doms): logit("backup", "invoking backup for " + dom.name()) for disk_source in disklist: + if disk_source.endswith(".iso"): + logit( + "backup", "skipping ISO file %s for %s" % (disk_source, dom.name()) + ) + continue + disk_file = disk_source.split("/")[-1] disk_dest = path.join(options.backpath, disk_file) @@ -160,6 +166,9 @@ def backup(doms): remove(xmlfile) # cleanup tmp files for disk_source in disklist: + if disk_source.endswith(".iso"): + continue + disk_file = disk_source.split("/")[-1] disk_dest = path.join(options.backpath, disk_file) logit("backup", "archiving %s for %s" % (disk_dest, dom.name())) @@ -182,6 +191,8 @@ def shutdown(doms, wait=180): secs = 10 wait /= secs # divide wait by secs + wait = int(wait) + for i in range(0, wait + 1): # if all doms are shut off, leave loop