summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-snapshot-create.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/apex/apex-snapshot-create.sh')
-rw-r--r--jjb/apex/apex-snapshot-create.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh
index 4647e0670..f2e61f22d 100644
--- a/jjb/apex/apex-snapshot-create.sh
+++ b/jjb/apex/apex-snapshot-create.sh
@@ -63,10 +63,11 @@ for node in $nodes; do
fi
done
+pushd ${tmp_dir} > /dev/null
echo "Gathering virsh definitions"
# copy qcow2s, virsh definitions
for node in $nodes; do
- cp -f /var/lib/libvirt/images/${node}.qcow2 ./
+ sudo cp -f /var/lib/libvirt/images/${node}.qcow2 ./
sudo virsh dumpxml ${node} > ${node}.xml
done
@@ -79,7 +80,7 @@ done
DATE=`date +%Y-%m-%d`
tar czf ../apex-csit-snap-${DATE}.tar.gz .
popd > /dev/null
-rm -rf ./.tmp
+sudo rm -rf ${tmp_dir}
echo "Snapshot saved as apex-csit-snap-${DATE}.tar.gz"
# update opnfv properties file