Required restore.json file for CLI
The nbosjm client CLI uses a restore.json file to define the restore parameters for the selective and the in-place restore.
An example for a selective restore of this restore.json is shown below. A detailed analysis and explanation is given afterwards.
The restore.json requires information about the backed-up resources. All required information can be gathered in the recovery point overview.
{
'name': 'sel-rest-5',
'description': 'sel-rest-desc-5',
'oneclickrestore': False,
'restore_type': 'selective',
'copy_number': '2',
'copy_type': 'BACKUP',
'type': 'openstack',
'openstack':
{
'restore_topology':False,
'instances':
[
{
'id': '91a26084-7134-4ae4-970c-8203fb18669f',
'name': 'sample-instance-restore',
'restore_boot_disk': True,
'availability_zone': 'nova',
'include': True,
'vdisks':
[
{
'id': 'c6fe8309-a95b-4bbb-9d72-57beafe4a3ae',
'new_volume_type': '__DEFAULT__',
'availability_zone': 'nova'
}
],
'nics':
[
{ 'id': 'd8680981-2113-45a8-aa7c-6edd68c97819',
'mac_address': 'fa:16:3e:d1:ce:ae',
'network': {
'id': 'd8680981-2113-45a8-aa7c-6edd68c97819',
'subnet': {
'id': '28206b2e-0a0e-46a3-9034-9d621b4bfb4f'
}
},
'ip_address': '172.20.2.230'
}
]
}
],
'networks_mapping': {
'networks': [
{'snapshot_network': {
'name': 'private',
'id': 'd8680981-2113-45a8-aa7c-6edd68c97819',
'subnet': {
'id': '28206b2e-0a0e-46a3-9034-9d621b4bfb4f'
}
},
'target_network': {
'id': 'd8680981-2113-45a8-aa7c-6edd68c97819',
'name': 'private',
'subnet': {
'id': '28206b2e-0a0e-46a3-9034-9d621b4bfb4f'
}
}
}
]
}
}
}