Restore
Restore to a XenServer Hypervisor
To restore a VM or VMs to a XenServer hypervisor, you should execute the restore command and specify the “where” parameter as in this example:
… Then set any other required restore plugin parameters for your restore. In the following restore session example, the “Preserve vm config on restore” plugin restore option is set to “yes”:
* restore where=/
…
Run Restore job
JobName: RestoreFiles
Bootstrap: /opt/bacula/working/srv-xen-01-dir.restore.2.bsr
Where: /
Replace: Always
FileSet: Full Set
Backup Client: srv-xen-01-fd
Restore Client: srv-xen-01-fd
Storage: File1
When: 2018-01-05 12:47:16
Catalog: MyCatalog
Priority: 10
Plugin Options: *None*
OK to run? (yes/mod/no): mod
Parameters to modify:
1: Level
2: Storage
3: Job
4: FileSet
5: Restore Client
6: When
7: Priority
8: Bootstrap
9: Where
10: File Relocation
11: Replace
12: JobId
13: Plugin Options
Select parameter to modify (1-13): 13
Automatically selected : xenserver: uuid=fe1ccf3b-1865-3942-c928-d98138397ff1
Plugin Restore Options
server: *None* (*None*)
port: *None* (*None*)
username: *None* (*None*)
password: *None* (*None*)
passfile: *None* (*None*)
storage_res: *None* (*Default location*)
preserve: *None* (*No*)
Use above plugin configuration? (yes/mod/no): mod
You have the following choices:
1: server (Restore server name)
2: port (Restore server port number)
3: username (Restore user name)
4: password (Restore user password)
5: passfile (Restore user password file)
6: storage_res (Storage Resource location for restore)
7: preserve (Preserve vm config on restore)
Select parameter to modify (1-7): 7
Please enter a value for preserve: yes
Plugin Restore Options
server: *None* (*None*)
port: *None* (*None*)
username: *None* (*None*)
password: *None* (*None*)
passfile: *None* (*None*)
storage_res: *None* (*Default location*)
preserve: yes (*No*)
Use above plugin configuration? (yes/mod/no):
The restore job log will inform you about what guest VM is restored and what new guest VM was created.
JobId 131: Start Restore Job RestoreFiles.2017-12-28_14.42.25_15
JobId 131: Using Device “FileChgr1-Dev2” to read.
JobId 131: xenserver: VM restore: vm1/10908c8a-f932-6f91-9cac-3034e3acf45b
JobId 131: Forward spacing Volume “Vol-0002” to addr=1758441248
JobId 131: Elapsed time=00:04:51, Transfer rate=3.158 M Bytes/second
JobId 131: xenserver: VM UUID created: 45c49e07-ff20-ab55-e622-05ff2fbb0c1f
The new guest VM created during the restore will get a new name-label set by the plugin as: <name-label>/<vmuuid> where <vmuuid> is the UUID of the original VM which was backed up.
Restore to Local Directory
* restore where=/tmp/bacula/restores
Please check the following example for the test “VM local restore”:
JobId 112: Start Restore Job RestoreFiles.2017-12-28_11.30.19_34
JobId 112: Using Device “FileChgr1-Dev2” to read.
JobId 112: xenserver: VM local restore
JobId 112: Forward spacing Volume “Vol-0001” to addr=5190619786
JobId 112: Elapsed time=00:00:30, Transfer rate=30.64 M Bytes/second
The restore job log will inform you that a restore will go to a local directory.