Skip to content

Commit 9250cbf

Browse files
LindirQuenyapuigru
authored andcommitted
Compress snapshot data as well.
1 parent d4eccf1 commit 9250cbf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

snapshot.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ done
1111
echo 'apache is ready .. snapshot in 10 seconds' && sleep 10
1212
echo 'savevm quick' | nc -q1 -w5 127.0.0.1 4445 >/dev/null
1313
kill -TERM "$pid"
14+
15+
# Convert the image one last time, so that the snapshot data will get compressed too.
16+
mv "alpine.qcow2" "alpine_temp.qcow2"
17+
qemu-img convert -c -O qcow2 "alpine_temp.qcow2" "alpine.qcow2"
18+
rm "alpine_temp.qcow2"

0 commit comments

Comments
 (0)