This commit is contained in:
Russell Ballestrini 2024-07-07 16:58:01 -04:00
parent b42a1161ca
commit 87d6979d7b

View file

@ -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