skip iso
This commit is contained in:
parent
b42a1161ca
commit
87d6979d7b
1 changed files with 12 additions and 1 deletions
13
virt-back
13
virt-back
|
|
@ -102,7 +102,7 @@ def invoke(doms, method):
|
||||||
|
|
||||||
|
|
||||||
def backup(doms):
|
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:
|
for dom in doms:
|
||||||
recreate = dom.isActive()
|
recreate = dom.isActive()
|
||||||
|
|
||||||
|
|
@ -126,6 +126,12 @@ def backup(doms):
|
||||||
logit("backup", "invoking backup for " + dom.name())
|
logit("backup", "invoking backup for " + dom.name())
|
||||||
|
|
||||||
for disk_source in disklist:
|
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_file = disk_source.split("/")[-1]
|
||||||
disk_dest = path.join(options.backpath, disk_file)
|
disk_dest = path.join(options.backpath, disk_file)
|
||||||
|
|
||||||
|
|
@ -160,6 +166,9 @@ def backup(doms):
|
||||||
remove(xmlfile) # cleanup tmp files
|
remove(xmlfile) # cleanup tmp files
|
||||||
|
|
||||||
for disk_source in disklist:
|
for disk_source in disklist:
|
||||||
|
if disk_source.endswith(".iso"):
|
||||||
|
continue
|
||||||
|
|
||||||
disk_file = disk_source.split("/")[-1]
|
disk_file = disk_source.split("/")[-1]
|
||||||
disk_dest = path.join(options.backpath, disk_file)
|
disk_dest = path.join(options.backpath, disk_file)
|
||||||
logit("backup", "archiving %s for %s" % (disk_dest, dom.name()))
|
logit("backup", "archiving %s for %s" % (disk_dest, dom.name()))
|
||||||
|
|
@ -182,6 +191,8 @@ def shutdown(doms, wait=180):
|
||||||
secs = 10
|
secs = 10
|
||||||
wait /= secs # divide wait by secs
|
wait /= secs # divide wait by secs
|
||||||
|
|
||||||
|
wait = int(wait)
|
||||||
|
|
||||||
for i in range(0, wait + 1):
|
for i in range(0, wait + 1):
|
||||||
|
|
||||||
# if all doms are shut off, leave loop
|
# if all doms are shut off, leave loop
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue