Installation guide

Maintenance Procedures
26
B.7.1.1. Backing up single host installations
The CLI must be used to backup the pool database. To obtain a consistent pool metadata backup
file, run xe pool-dump-database against the XenServer Host and archive the resulting file. The
backup file will contain sensitive authentication information about the pool, so ensure it is securely
stored.
To restore the pool database, use the xe pool-restore-database from a previous dump file. If
your XenServer Host has died completely, then you must first do a fresh install, and then run the
xe pool-restore-database command against the freshly installed XenServer Host.
After a restoration of the pool database, some VMs may still be registered as being “suspended”,
but if the storage repository with their suspended memory state (defined in the [suspend-VDI-
uuid] field) was a local SR, it will no longer be available since the host has been reinstalled. To
reset these VMs back to the halted state so that they can be started up again, use the xe vm-
shutdown vm=vm_name -force command, or use the xe vm-reset-powerstate vm=vm_name
-force command.
Note that XenServer Hosts restored using this method will have their UUIDs preserved. Thus,
if you restore to a different physical machine while the original XenServer Host is still running,
there will be a UUID clash. The main observable effect of this clash will be that XenCenter will
refuse to connect to the second XenServer Host. Pool database backup is not the recommended
mechanism for cloning physical hosts; you should use the automated installation support for that
(see Appendix C, PXE installation of XenServer Host).
B.7.1.2. Backing up pooled installations
In a pool scenario, the master host provides an authoritative database which is synchronously
mirrored by all the member hosts in the pool. This provides a degree of built-in redundancy to a
pool; the master can be replaced by any member since each of them have an accurate version
of the pool database. Please refer to the XenServer Administrator's Guide for more information
on how to transition a member into becoming a master host.
This level of protection may not be sufficient; for example, if your shared storage containing
the VM data is backed up in multiple sites, but your local server storage (containing the pool
metadata) is not. To fully recreate a pool given just a set of shared storage, you must first backup
the xe pool-dump-database against the master host, and archive this file.
Procedure B.6. To subsequently restore this backup on a brand new set
of hosts
1. Install a fresh set of XenServer hosts from the installation media, or via PXE.
2. Use the xe pool-restore-database on the host designated to be the new master.
3. Run the xe host-forget command on the new master to remove the old member machines.
4. Use the xe pool-join command on the member hosts to connect them to the new cluster.
Please refer to the "Coping with machine failures" section of the XenServer Administrator's Guide
for specific restoration scenarios.
B.7.2. Backing up XenServer Hosts