Difference between revisions of "ProxMox: Backup - Restore - Live Migration"

From OnnoWiki
Jump to navigation Jump to search
Line 28: Line 28:
 
[[Image:Screen-define-backup-job.png||Define new backup job]]
 
[[Image:Screen-define-backup-job.png||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.
+
Konfigurasi yang di hasilkan di simpan sebagai cron job di '/etc/cron.d/vzdump'. File ini di sinkronkan ke semua node cluster.
 +
 
  
 
=Restore with vzrestore and qmrestore=
 
=Restore with vzrestore and qmrestore=

Revision as of 09:58, 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.

Detail tentang OpenVZ commandline dapat dilihat di Backup of a running container with vzdump

Ada baiknya membaca halaman manual:

man vzdump

Interface Web

Proxmox VE menyediakan interface web untuk mendefinisikan backup job. Langkah pertama adalah men-definiskan backup storage. Kebanyakan kita menggunakan NFS share di NAS/SAN. Pilih 'VZDump Backups' konfigurasi storage. Lihat juga Storage Model

Define a backup storage

Selanjutnya, kita dapat mendefinisikan backup job menggunakan storage tersebut.

Define new backup job

Konfigurasi yang di hasilkan di simpan sebagai cron job di '/etc/cron.d/vzdump'. File ini di sinkronkan ke semua node cluster.


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.

Referensi

Pranala Menarik