Integrating Citrix XenServer and HP Data Protector

b. Go to the download section for the version of XenServer that you are using.
c. Download
XenAPI.py.
4. Copy XenAPI.py to the same location as the integration scripts.
5. Create a folder with read and write permissions for temporary use during backup. Create the
folder as follows:
On Windows:
C:\tmp\backup\
On Linux:
/tmp/backup/
Important: It is the contents of this directory that will actually be backed up to the backup device
by Data Protector, so it must have enough space available to cope with your largest likely backup.
For instance, if you want to be able to backup all the virtual machines on your XenServer in one
operation, there must be enough space for all of them. The folder will be referred to as the
temporary backup folder in these instructions.
Integration script functions
The integration components, supplied in the xenServer_backup_solution.zip file, and
their purposes are described below:
DPxen_config.py This is the default configuration file for backup and restore operations
using the integration. It is the only file that should be changed by the user, to match particular
work scenarios. For details of setting up its contents, see
Updating configuration script
DPxen_config.py for backup
on page 8 and Updating configuration script DPxen_config.py for
restore
on page 11.
For convenience, you can create your own versions of this file, with your own names, for
instance
myBackupConfig and myRestoreConfig, and specify these when calling the
main scripts
DPxen_backup.py and DPxen_restore.py.
DPxen_operations.py This contains the same auxiliary functions used during backup
and restore, such as functions to import or export a virtual machine, or find a virtual machine
by name.
DPxen_backup.py This controls obtaining the files to backup from the XenServer,
according to the parameters specified in the configuration file, and writing them to the
temporary backup folder ready for backup by Data Protector. If snapshots are created during
the backup process it also deletes them afterwards.
This script can be called with the name of the configuration file as an argument, which allows
you to use your own configuration file. If called without an argument, the default configuration
file,
DPxen_config.py, is used.
DPxen_restore.py This restores the files saved during the backup in the XenServer. It
also deletes all the auxiliary elements created during a restore in the XenServer. The files
restored by Data Protector to the temporary backup folder are not deleted by this script. The
script also accepts as an argument the name of the configuration file to use.
DPxen_postbackup.py This can be used to delete the contents of the temporary backup
folder. It should be run after completion of a backup session as a cleanup operation.
Alternatively, it could be used to delete the contents of the temporary backup folder before a
restore session.
Backup using the integration
To produce a backup using the integration, you need to perform the following operations:
1. Update the configuration script DPxen_config.py, or your own equivalent.
2. Ensure that the temporary backup directory is empty.
3. Set up a Data Protector backup specification.
7