Backup über snapshot: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 13: Zeile 13:
 
=Backup=
 
=Backup=
 
*rsync --progress /var/lib/libvirt/images/tiazel.xinux.lan.qcow2 /var/lib/libvirt/images/tiazel.xinux.lan-backup.qcow2
 
*rsync --progress /var/lib/libvirt/images/tiazel.xinux.lan.qcow2 /var/lib/libvirt/images/tiazel.xinux.lan-backup.qcow2
 
+
=Aktiver Zustand auf das alte Image übertragen und aktiv schaltn=
=Block pull image=
+
*virsh blockcommit  tiazel.xinux.lan  vda --active --verbose --pivot
*virsh blockpull --wait --domain tiazel.xinux.lan /var/lib/libvirt/images/tiazel.xinux.lan.1
 
  Pull complete
 
=Delete snapshot=
 
*virsh snapshot-delete tiazel.xinux.lan  1 --metadata
 
Domain snapshot 1 deleted
 
=Backup=
 
*rsync --progress tiazel.xinux.lan.qcow2 tiazel.xinux.lan-backup.qcow2
 
 
=Links=
 
=Links=
 
*https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/Virtualization_Deployment_and_Administration_Guide/sub-sect-blockpull.html
 
*https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/Virtualization_Deployment_and_Administration_Guide/sub-sect-blockpull.html
 
*http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
 
*http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit

Version vom 1. April 2017, 21:26 Uhr

Welche Platten werden benutzt

  • virsh domblklist tiazel.xinux.lan
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/tiazel.xinux.lan.qcow2

Snapshot erzeugen

  • virsh snapshot-create-as --domain tiazel.xinux.lan state1 --diskspec vda,file=/var/lib/libvirt/images/tiazel.xinux.lan.state1 --disk-only --atomic

Welche Platten werden benutzt

  • virsh domblklist tiazel.xinux.lan
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/tiazel.xinux.lan.state1

Backup

  • rsync --progress /var/lib/libvirt/images/tiazel.xinux.lan.qcow2 /var/lib/libvirt/images/tiazel.xinux.lan-backup.qcow2

Aktiver Zustand auf das alte Image übertragen und aktiv schaltn

  • virsh blockcommit tiazel.xinux.lan vda --active --verbose --pivot

Links