Difference between revisions of "ProxMox: Backup - Restore - Live Migration"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 5: | Line 5: | ||
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. | 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 | + | * stop: Stop VE saat backup (downtime yang sangat lama) |
− | * suspend: | + | * suspend: Menggunakan suspend/resume (minimal downtime dengan OpenVZ, downtime lama dengan KVM VM) |
− | * snapshot: | + | * snapshot: Menggunakan LVM2 (tidak ada downtime, online) |
− | VZDump | + | 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 [http://wiki.openvz.org/Backup_of_a_running_container_with_vzdump Backup of a running container with vzdump] | For details regarding OpenVZ commandline version see [http://wiki.openvz.org/Backup_of_a_running_container_with_vzdump Backup of a running container with vzdump] |
Revision as of 09:43, 2 July 2011
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
Next you can define the backup job using that storage.
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.