How to take a XenServer toolstack (XAPI) database dump and view it

How to take a XenServer toolstack (XAPI) database dump and view it

book

Article ID: CTX217618

calendar_today

Updated On:

Description

XenServer stores the vital information related to objects such as VM, VIF, VDI, PBD in an XML format file under /var/xapi/state.db. This file is synced between pool members at regular intervals to maintain a consistent view of the XenServer pool.

We recommend that you back up this XAPI database file. This article describes how to do that and how to view the file in a formatted way


Instructions

  1. Log in to the XenServer host
  2. Run the following command to export the in-memory XAPI database to a file named dump.xml:
    • # xe pool-dump-database file-name=dump.xml
  3. Now to view the file in a XML-formatted way, run the xmllint command against it:
    • # xmllint --format dump.xml | less