ProxMox: Backup - Restore - Live Migration

From OnnoWiki
Revision as of 09:43, 2 July 2011 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Backup adalah salah satu fitur yang penting yang ada di Proxmox VE.

Backup menggunakan VZDump

VZDump adalah tool yang dapat digunakan untuk membuat snapshot dari Virtual Machine (OpenVZ dan KVM) yang sedang berjalan. VZDump pada dasarnya membuat arsip tar dari folder private di Virtual Machine, yang tentunya termasuk file konfigurasi.

Ada beberapa cara untuk memperoleh konsistensi backup:

  • stop: Stop VE saat backup (downtime yang sangat lama)
  • suspend: Menggunakan suspend/resume (minimal downtime dengan OpenVZ, downtime lama dengan KVM VM)
  • snapshot: Menggunakan LVM2 (tidak ada downtime, online)

VZDump menyimpan backup di disk dalam satu file. File ini yang selanjutnya masuk ke backup tape untuk di arsipkan. You can copy the file directly to a remote storage for easy tape backup (e.g. on a windows file server).

For details regarding OpenVZ commandline version see Backup of a running container with vzdump

Also check out the man pages:

man vzdump

Web Interface

Proxmox VE provides a web interface to define the backup jobs. First step is to define a backup storage. Most people simply use a NFS share on their NAS/SAN. Simply select content 'VZDump Backups' when you configure the storage. See also Storage Model

Define a backup storage

Next you can define the backup job using that storage.

Define new backup job

The resulting configuration is saved as cron job to '/etc/cron.d/vzdump'. That file is syncronized to all cluster nodes.

Restore with vzrestore and qmrestore

To restore a Virtual Machine, just copy the tar file to the host where you want to restore. Depending on the type of virtual machine, use 'vzrestore' to restore OpenVZ containers, or 'qmrestore' to restore KVM machines.

Example1: Restore the backup of KVM VM 555 (backup file: vzdump-qemu-555.tar) to CT 500

qmrestore vzdump-qemu-555.tar 500


Example2: Restore the backup of OpenVZ container CT 777 (backup file: vzdump-openvz-777.tar) to CT 600

vzrestore vzdump-openvz-777.tar 600

Example3: Restore the backup of KVM VM 555 (backup file: vzdump-qemu-555.tgz) to CT 500 in Storage with the Name raid1data

qmrestore --storage raid1data vzdump-qemu-555.tgz 500

Live Migration

Proxmox VE support live migration of Virtual Machines via web interface. To migrate from one physical host to another, you need at least two Proxmox VE servers, see Proxmox_VE_Cluster.