Source:Citrix XenServer Restore
Overview
The restore of virtual machines (VMs) is quite similar to regular file system restore. There are two ways to restore your Citrix Hypervisor (XenServer) virtual machines in SEP sesam:
- by using GUI restore wizard (described below) or
- through the web interface Restore Assistant (in v. ≥ 4.4.3 Beefalo).
Even though most of the options are the same in both restore interfaces, the web Restore Assistant interface is designed to be more intuitive and offers additional advanced options. However, it cannot be used for scheduling restore or to perform a single file restore as these features are only supported in the GUI mode. For more details, see Restore Assistant.
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.
GUI restore
This article describes the restore operation workflow that is performed in the GUI. To perform online restore by using the web interface, see Restore Assistant.
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. For step-by-step procedure, see Standard Restore Procedure.
As of SEP sesam v. 4.4.3 Beefalo, you can also restore single files from the FULL, DIFF or INCR backups if the saveset is stored on a default Path data store, Si3 deduplication store or HPE StoreOnce. By mounting VHD the operating system creates a virtual drive from the file, assigns a drive letter, and makes the drive available locally on your server. For details, see section Restoring single files.
Restore options
You can restore one VM at a time. Depending on your SEP sesam version and selection of options, you can choose different combinations of restore options to perform 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 another name for the target VM is specified. 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 are performing a standard VM restore, you can select whether you want your virtual machine to start automatically after restore or not.
- Auto recover after restore (in v. < 4.4.3 Beefalo): By default VM is always registered after the restore on XenServer and with it in 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 after the restore on XenServer.
Additionally, by using a command -a replace_vm_disk you can restore only VM's disk data, without restoring VM configuration settings. For details, see step 6b about using the Expert options.
Restoring Citrix XenServer virtual machine
Typically, you would restore a virtual machine to its original location (Restore to original VM) if the original VM is inoperative. By restoring a full VM backup, you create a new VM with the identical content and configuration to what it was when the backup was performed. You can also restore your VM with new name, restore VM to a different location or choose to restore only VM's disk data (without configuration) to the same restore target.
Create a new restore task for the VM you want to restore.
Note | |
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.
- Under the Saved in period drop-down lists, specify the time frame for which you want to conduct the search. Click Next.
- The search results are displayed. From the list of savesets matching your query, select the task you want to restore. Click Next.
- Review your restore task configuration and set additional options, if required. Details of the selected saveset are displayed at the top and at the bottom (Optional data source selection) of the window. The name of the restore task is automatically generated in the Restore task name field. You can edit the name and insert a comment below.
- 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.
-
As of v. 4.4.3. Beefalo, the Expert Options button for specifying advanced restore options is only available in the Expert UI mode. It is not available for users that run the GUI in Basic or Advanced mode. In the latter case, if you want to access the Expert Options you first have to change the Basic/Advanced UI mode to Expert, as described in Selecting UI mode.
Note that the pre/post script is not available for Citrix Xen restore.
-
Note When restoring a differential or incremental backup from Citrix Xen VM, SEP sesam has to merge the backup chain into a single file; by defult, <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 different 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 screenshot below. - You can also use the Expert Options dialog to specify additional restore commands. For example, if you only want to restore VM's disk data but leave the configuration settings of a VM as they are, you can specify the following command in the Restore options field: -a replace_vm_disk This command can only be used if the original backup source VM still exist and if you restore to the original location by specifying the Restore to original VM (see setting the Target data in step 5).
-
- In the final step of the restore wizard, you can review all the settings of your restore task. You can also edit the settings by using Change Selection button. If you want to start your restore immediately, click Start. If you want to save the restore task, click Save.
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
In case 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: 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 another partition (/dev/sda2) and does not overwrite the current version of the file system.
- To use the restored version of the root file system, you need to reboot the XenServer host using the XenServer installation CD and select the Restore from backup option.
- After the restore is completed, reboot the XenServer host again to start it up from the restored image.
Restoring single files (Expert mode only)
With v. 4.4.3 Beefalo, SEP sesam introduces single file restore – item-level restore of files, folders, and volumes from the FULL, DIFF or INCR backup of Citrix XenServer virtual machine by mounting VHD on a device server and browsing the content of a virtual disk file.
Tip | |
If you prefer to watch a video rather than to read a step-by-step guide, you can learn all the steps of the restore procedure by watching Backup of Citrix Hypervisor (XCP-ng/XenServer) on SEP sesam YouTube channel. |
Before starting a restore, check the supported file systems and restrictions.
Mounting Citrix XenServer virtual disk (VHD file)
Create a new restore task for individual item(s) you want to restore.
- 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 by filename or path.
- When searching by task name, use the drop-down list of available tasks and select the one you want to restore from. This option is selected 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.
- Under the Saved in period drop-down lists, specify the time frame for which you want to conduct the search. Click Next.
- The search results are displayed. From the list of savesets matching your query, select the version from which you want to restore an individual file. Then select the check box Mount virtual disk(s). Note that some restrictions apply.
- Mount is triggered and all VHDs of the selected VM are mounted to the device server using one or more unused drive letters of the Windows system e.g., D:, E:, etc. This may take a few seconds. Click OK.
- You can now either use the file explorer on your server to browse and copy the needed files directly to the target location, or click Next to select the required files in the Select Files dialog.
- If you clicked Next, in the Select Files window select the data you want to restore and click Next.
- On the fourth step of the restore wizard (Target Settings), select a restore target where you want to restore your files.
- In the final step of the restore wizard, you can review all the settings of your restore task. You can start your single file restore immediately by clicking Start. If you want to save the restore task, click Save.
- Click OK to unmount the saveset and close your restore session.
A restore task can be scheduled like any other task. If you want to add a restore task to the schedule, see Scheduling Restore.
Monitoring restore
You can view the status of your restore jobs by selecting Job State -> Restores from the Main Selection. Restore overview provides detailed information on 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.
As of 4.4.3 Beefalo V2, you can also monitor the restore progress using the Web UI. For details, see SEP sesam Web UI.