Skip to main content

Metadata backups

Every XCP-ng or XenServer pool keeps a database, the XAPI database, describing everything that isn't the data itself: VMs and their settings, storage repositories, networks, and how they all fit together. Xen Orchestra has an equivalent of its own: its configuration, holding users, authorizations and resource sets, backup jobs, and plugin settings.

Metadata backup protects both layers, with two backup kinds you can enable independently or together in a single job:

  • Pool metadata backup: a dump of the pool's XAPI database (VMs, SRs, networks, etc.).
  • XO config backup: the configuration of your Xen Orchestra instance itself.

This is the backup that saves you when the hardware dies but the storage survives: reinstall a host, restore the pool metadata, and the pool knows about its VMs and SRs again. Likewise, if you lose your XOA, restoring the XO config brings back your users, jobs, and settings without rebuilding them by hand.

PoolXAPI databaseVMs, SRs, networksXen OrchestraXO config:users, jobs,settings, pluginsdumpexportBackup repository (BR)pool metadataXO config
Metadata backup: XO dumps the pool's XAPI database and exports its own config to the BRPoolXOBackup repository
note

In the XO 5 interface, backup repositories are still labeled Remotes.

Performing a backup

In Backup → New, choose what kind of job you want to create: backing up VMs, or backing up metadata.

zoomed detailBackup type choice between Backup VMs and Backup metadata
Backup type choice between Backup VMs and Backup metadata

Selecting Backup metadata opens a dedicated job form. Toggle Pool metadata, XO config, or both at the same time, then pick the pools to cover and the target BR.

zoomed detailMetadata backup job form with Pool metadata and XO config toggles, target remotes, pools and schedules
Metadata backup job form with Pool metadata and XO config toggles, target remotes, pools and schedules

Each schedule has its own name and retention, one for pool metadata backups and one for XO config backups. At least one retention must be higher than 0.

zoomed detailSchedule modal with name, pool retention and XO retention fields
Schedule modal with name, pool retention and XO retention fields

Once saved, the job shows up alongside your other backup jobs, with its modes listed (Pool metadata, XO config).

zoomed detailSchedules list showing a metadata job with Pool metadata and XO config modes next to a regular backup job
Schedules list showing a metadata job with Pool metadata and XO config modes next to a regular backup job

Performing a restore

warning

Restoring pool metadata completely overwrites the XAPI database of a host. Only perform a metadata restore if it is a new server with nothing running on it (eg replacing a host with new hardware).

Go to Backup → Restore and click the Metadata filter button: the list switches to the metadata backups available for restore, both XO config backups and pool metadata backups.

zoomed detailRestore view filtered on metadata, listing a Xen Orchestra config backup and a pool metadata backup
Restore view filtered on metadata, listing a Xen Orchestra config backup and a pool metadata backup

To restore one, click the blue restore arrow on its row, choose the backup date to restore, and click OK.

zoomed detailRestore XO metadata modal with a backup date selector
Restore XO metadata modal with a backup date selector

That's it!

tip

Metadata backup is one half of protecting your orchestration layer: the other half is keeping the XOA itself recoverable. See How to ensure XOA is always available.