4 4 3 Grolar:Citrix XenServer Restore
This article provides information on how to restore Citrix Hypervisor using the GUI. For details on restoring using the web Restore Assistant, see Citrix Hypervisor Single File Restore and Restore Assistant.
The restore of virtual machines (VMs) is quite similar to regular file system restore.
SEP sesam supports restoring full virtual machines (VMs) as well as XenServer hosts to the original target from where the backup image was captured or to an alternative target; in case of a failed XenServer host you can restore it to a random Linux machine.
There are two ways to perform a Citrix Hypervisor restore in SEP sesam: using the GUI restore wizard (described here) or via the web interface Restore Assistant (in v. ≥ 5.0.0 Jaglion). Although most options are the same in both restore interfaces, the web Restore Assistant is more intuitive and offers additional advanced options.
- In the GUI, the restore is triggered from the Menu bar -> Activities -> Restore. The restore wizard guides you through the process of restoring your data. The default storage repository must be defined in the Xen center, otherwise the restore will fail.
- You can only use the GUI to schedule a restore task (Scheduling -> New -> New Restore Event or Scheduling -> right-click schedule or event -> New Restore Event). For details, see Scheduling Restore.
- You can access the web Restore Assistant in one of the following ways:
- via the GUI: by clicking the Restore Assistant icon in the toolbar or from Activities -> Restore Assistant
- from SEP sesam Web UI: left menu -> Restore Assistant
- or by entering the following address in the browser bar: http://[sesamserver]:11401/sep/ui/restore/.
- The operations and options available after logging in may differ depending on the user type. Other Web UI display restrictions may depend on the custom roles with specific permissions and the UI mode.
For details, see About Authentication and Authorization and User Roles and Permissions.
Single file restore
SEP sesam supports single file restore (SFR) (in v. ≥ 4.4.3 Beefalo) – item-level restore of files, folders, and volumes from the FULL, DIFF or INCR backup of the Citrix XenServer virtual machine if the saveset is stored on a default Path data store, Si3 deduplication store or HPE StoreOnce. By mounting the VHD, the operating system creates a virtual drive from the file, assigns a drive letter, and makes the drive available locally on your server.
You can restore one VM at a time. Depending on your SEP sesam version and the selection of options, you can choose different combinations of restore options to perform the restore according to your needs:
- Do not overwrite existing items: The VM will not be restored if it already exists on the target server. A new VM name has to be specified as target. The MAC address of a restored VM is newly created.
- Overwrite existing items : During a restore with the option overwrite the original VM is deleted, even if a different name is specified for the target VM. The MAC address is the same as during the backup.
- Create new version: A new VM is created. The MAC address is newly created.
- (Do not) start virtual machine after restore (in v. ≥ 4.4.3 Beefalo): If you perform a standard VM restore, you can select whether your virtual machine should be started automatically after the restore or not.
- Auto recover after restore (in v. < 4.4.3 Beefalo): By default, the VM is always registered after the restore on the XenServer and with it in the Xen center.
- Auto recover and online after restore (in v. < 4.4.3 Beefalo): Registers and starts the VM and brings it online.
- No recover after restore (in v. < 4.4.3 Beefalo): The VM is not registered on the XenServer after the restore.
Additionally, you can use the command -a replace_vm_disk to restore only the VM's disk data without restoring the VM's configuration settings. For details, see step 6.b on using the Expert options.
Restoring Citrix XenServer virtual machine
Typically, you restore a virtual machine to its original location (Restore to original VM) when the original VM is no longer functional. By restoring a full VM backup, you create a new VM with the same content and configuration as at the time of the backup. You can also restore your VM under a new name, restore the VM to a different location, or restore only the VM's disk data (without configuration) to the same restore target.
|If you prefer to watch a video, you can learn all the steps of the restore procedure in Backup of Citrix Hypervisor (XCP-ng/XenServer) on the SEP sesam YouTube channel.|
Create a new restore task for the VM you want to restore.
|It is not possible to restore a VM from a Citrix XenServer host 7.x backup to a host running an older version of XenServer (6.x).|
- From the SEP sesam GUI menu bar, select Activities -> Restore. The New Restore Task window opens.
- Select what you want to restore. You can search savesets by task name or filename or path.
- When searching by task name, use the drop-down list of available tasks and select the one you want to restore. This option is enabled by default.
- If you are searching by filename/path, select the option Filename or path in a saveset and enter your search expression in the search pattern field.
- Target data
- You can restore the Citrix VM to the original VM (if the Target node is the same server from which the data was backed up, i.e., when the source and target server are the same) or under a new VM name. If you want to restore VM under a different name, select the option Restore with new VM name and enter a new VM name or use the Browser button.
- Target node
- It shows the target server to which the data will be restored. By clicking Change VM target selection, you can restore a task to a different target by selecting the appropriate target node and data store from the drop-down lists. If no target path is defined, the VM is restored to the default (original) location.
- VM restore options
- Select one of the following from the drop-down list:
- Do not overwrite existing items (default): The VM will not be restored if a VM with the same name already exists on the target server. In such case, the following error is displayed: Error: Restore failed. A virtual machine with the same name already exists..
- Overwrite existing items: If a VM with the same name exists on the target server, it will be replaced by the restored version, but its MAC address will remain the same. Note that if two VMs with the same name exist on the target server, the restore fails with: Error: Restore failed. A virtual machine with the same name already exists.
- Create a new version: Will restore VM under a new name.
- You can also select whether you want your virtual machine to start automatically after restore by selecting Start virtual machine after restore/Do not start (selected by default).
- Optional data source selection
- Preferred media pool: If the data was migrated or replicated and different media pools were used for the process, the source media pool to restore from can be selected from the drop-down list of available media pools.
- Used media | barcode: If the data was migrated, the migrated copy is stored to another media; the source media to restore from can be selected from the drop-down list of available media.
- The Drive field shows the drive with backed up data.
- The Interface field shows the server with the attached data storage containing the selected saveset.
Note When restoring a differential or incremental backup from a Citrix Xen VM, SEP sesam has to merge the backup chain into a single file; by default, the <SESAM_VAR>/work directory is used for this. Ensure that there is enough space in the <SESAM_VAR>/work directory or change the location of this temporary directory by setting the path to a new directory or another storage device where more storage space is available. To specify a directory other than the current <SESAM_VAR>/work directory, use the Expert options button to add
-a tmpdir=/<path>/<selected_directory>in the Restore options field, as shown in the following screenshot.
- You can also use the Expert Options dialog to specify additional restore commands. For example, if you only want to restore the VM's disk data but leave the configuration settings of a VM unchanged, you can specify the following command in the Restore options field:
-a replace_vm_diskThis command can only be used if the original backup source VM still exists and if you restore to the original location by specifying Restore to original VM (see setting Target data in step 5).
A restore task can be scheduled like any other task. If you want to add a restore task to the schedule, see Scheduling Restore.
Restoring XenServer host
If you want to restore a XenServer host from a specific backup, restore the host backup created with SEP sesam to a random Linux machine.
- You have to restore the file as regular file restore. Under the Target Settings -> Expert Options -> under the Task Type tab, select Write saveset into file option and start your restore.
- After you have restored the file, copy it to the Xen system and execute the following command:
- To use the restored version of the root file system, you need to reboot the XenServer host via the XenServer installation CD and select the Restore from backup option.
- After the restore is complete, reboot the XenServer host again to start it with the restored image.
xe host-restore file-name=<host_backup_filename>
This copies the compressed image back to the hard disk of the XenServer host on which the command is run. The restore command actually unpacks the compressed backup file and restores it to its normal form, but it is written to a different partition (/dev/sda2) and does not overwrite the current version of the file system.
Restoring single files (SFR)
You can view the status of your restores in the GUI (Job State -> Restores) or SEP sesam Web UI (Monitoring -> Restores). Restore overview provides detailed information about the last run of restore jobs, including the task name, status (successful, error, in queue ...), start and stop time of the last backup, data size, throughput, client, and message.