Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
hypervisor:virtbackup [2012/09/04 12:54]
giancarlo
hypervisor:virtbackup [2012/09/21 16:14]
giancarlo
Line 1: Line 1:
 +
 ====== Virt-backup.pl: backup and restore ====== ====== Virt-backup.pl: backup and restore ======
  
Line 7: Line 8:
 # wget http://repo.firewall-services.com/misc/virt/virt-backup.pl # wget http://repo.firewall-services.com/misc/virt/virt-backup.pl
 # chmod +x virt-backup.pl # chmod +x virt-backup.pl
 +
 +# apt-get install libxml-simple-perl libsys-virt-perl libfile-which-perl
 </code> </code>
 </WRAP> </WRAP>
Line 19: Line 22:
 </code> </code>
 </WRAP> </WRAP>
 +
 +To mount iscsi partition at boot:
 +<WRAP prewrap center>
 +<code>
 +# blkid
 +    ...
 +    /dev/mapper/iscsi2-backup: UUID="0a413f6c-50cd-45c7-ba1c-0a413f6c1ac6" TYPE="ext4"
 +
 +# nano -w /etc/fstab
 +
 +    + UUID=0a413f6c-50cd-45c7-ba1c-0a413f6c1ac6  /var/lib/libvirt/backup    ext4    defaults,auto,_netdev         0
 +</code>
 +</WRAP>
 +
  
 **Live backup of LVM virtual machine by snapshot** **Live backup of LVM virtual machine by snapshot**
Line 76: Line 93:
 -rw-r--r-- 1 root root 8388608000 Aug 10 17:28 tubu1-clone_vda.img -rw-r--r-- 1 root root 8388608000 Aug 10 17:28 tubu1-clone_vda.img
 -rw-r--r-- 1 root root       2453 Aug 10 17:23 tubu1-clone.xml -rw-r--r-- 1 root root       2453 Aug 10 17:23 tubu1-clone.xml
 +</code>
 +</WRAP>
 +
 +**Restore to same virtual machine (LVM)**
 +
 +<WRAP prewrap center>
 +<code>
 +# virsh shutdown tubu1-clone
 +# dd if=/var/lib/libvirt/backup/tubu1-clone/tubu1-clone_vda.img | pv -s 8G | dd of=/dev/iscsi2/tubu1-clone
 +# virsh restore tubu1-clone.state
 </code> </code>
 </WRAP> </WRAP>
Line 146: Line 173:
  
 <WRAP right 35% rightalign lo> <WRAP right 35% rightalign lo>
-+[[hypervisor:fromesxi|Migrate from esxi 4.1]] 
 </WRAP> </WRAP>
 <WRAP left 35% leftalign lo> <WRAP left 35% leftalign lo>
 
 
hypervisor/virtbackup.txt · Last modified: 2012/09/24 11:37 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki