[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] qcow2 external snapshots - backup routine

From: gunnar wagner
Subject: [Qemu-discuss] qcow2 external snapshots - backup routine
Date: Tue, 27 Jan 2015 17:50:31 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

I want to setup a routine for daily backups of a qemu/kvm VM (using qcow2)

using external snapshots (aka overlay omages, ako copy-on-write images) have been recommended an that makes sense to from the backup point of view (need to backup small files)

my problem ... the procedure to setup, apply and start an external snapshot ...

   1. virsh shutdown [base_name.qcow2]
   2. cd /path/to/image_location
   3. qemu-img create -f qcow2 -b [base_name.qcow2) [new_snapshot.qcow2]
   4. cd /etc/libvirt/qemu
   5. cp base_name.xml new_snapshot.xml
   6. vim new_snapshot.xml
   7. .... manually adjust mac address, uuid, image file name, vm name
   8. virsh define [
   9. virsh start [new_snapshot]

... is pretty lengthy though (and you can easily make mistakes doing that). Maybe there is a shortcut to do this that I am not seeing yet? Or maybe someone has a script to automate that procedure?
making a script seems to be not so difficult ... if there wasn't editing of the xml file (which I find to be tricky). But maybe editing of the xml infos could be done by using virsh commands instead of editing the xml file?

any suggestions would be welcome

reply via email to

[Prev in Thread] Current Thread [Next in Thread]