+86-135-5029-3426 sales@vinchin.com
logo
Vinchin Blog
Vinchin Blog XenServer backup and restore commands

XenServer backup and restore commands

2021-09-10

1. Backup and restore metadata in the pool:

Backup command: xe pool-dump-database file-name=[filepath and name]

Example: xe pool-dump-database file-name=/dev/mnt/dbdump

Restore command: xe pool-restore-database file-name=[file path and name] dry-run=true

Example: xe pool-restore-database file-name=/dev/mnt/dbdump dry-run=true

2. Back up and restore the XenServer host system:

Backup command: xe host-backup host=[hostname] file-name=[filepath and name.xbk]
Example: xe host-backup host=xenbx1 file-name=/dev/mnt/xenbx1.xbk 

Note: restore the system, restart XenServer, start from the XenServer installation disk, select "restore from backup", and only change to the local machine

3. Backup and restore XenServer VM virtual machine:

(1) Export VM all data

a. Close VM

b. Use Xe VM list to obtain the UUID of VM

c. Execute the command to export VM all data:

xe vm-export vm=[vm_uuid] filename=[filepath and filename.xva]

Example: Xe VM export VM = XXX... XX filename = / dev / MNT / server1.xva

If only metadata is exported, then

xe vm-export vm=[vm_uuid] filename=[filepath and filename.xva] --metadata

Example: Xe VM export VM = XXX... XX filename = / dev / MNT / server1.xva -- metadata

(2) Import virtual machine

Xe VM import sR = [SR UUID] filename = [filepath and filename. XVA]

For example: Xe VM import sR = RAID5 file name = / dev / MNT / server1.xva

4. Create a snapshot:

Xe VM snapshot VM = [VM UUID] new name label = [VM snapshot name]

For example: Xe VM snapshot VM = XXX... XX new name label = server1snap1


  • Tag:
  • Backup

Interested Blogs More
DOWNLOAD NOW YOU CAN ENJOY A 60-DAYS FULL-FEATURED FREE TRIAL !