Appendix C: Bulk restore specifications

Based on the bulk restore options you specify when restoring multiple instances, HYCU for Google Cloud generates a bulk restore specification. If you choose to further modify the bulk restore specification instead of running the restore immediately, a dialog box opens, containing the POST method URL and the generated restore specification.

You can edit the specification directly or copy it to the clipboard by clicking Copy to clipboard and then further editing it with a text editor of your choice. After you update the specification, click Execute to run the restore specification.

n Note  The bulk restore specification API is not available through the REST API Explorer.

Elements of a bulk restore specification

The basic elements of a bulk restore specification include the type of the specification (type), a flag whether to overwrite existing items (overwriteExisting), and the items to restore.

Syntax

{
  "type": "VMS" | "DISKS",
  "overwriteExisting": false | true,
  "items": [
    {
      "source":
      {
        "path": "<path>",
        "disks": [<disk>,...]
      },
      "destination":
      {
        "path": "<path>",
        "disks": [<disk>, ...],
        "networkInterfaces": [<networkInterface>, ...],
        "metadata": {},
        "labels": {},
        "tags": []
      },
    },
    ...
  ],
}

Basic elements

  • type: "VMS" | "DISKS"

    The restore type, VMS for instances and DISKS for disks.

  • overwriteExisting: false | true

    If set to true, instances in the target region and zone with the same name as the source instances or disks attached to instances, with the same name as the source disks are overwritten during restore.

    Default: false

  • items []

    An array of items to restore, each item element contains a source and a destination.

Items to restore

Each item consists of a source and a destination record:

  • source

    The source record contains the path and an array listing the disks.

  • destination

    The destination record contains the path, an array listing the disks, an array listing the network interfaces, and tags and labels.

Source and destination elements

  • path

    The path in the format projects/<project>/zones/<targetZone>/instance/<instanceName>.

  • disks

    An array containing the disks to be restored. Disks can either contain the disk name for the source disks or a record with the following elements in the case of destination disks:

    • diskName

      The name of the original disk.

    • newDiskName

      The name of the restored disk, including the specified postfix. If no postfix is specified, the new name equals the original disk name.

    • newDeviceName

      The name of the restored disk device, including the specified postfix. If no postfix is specified, the new name equals the original device name.

    • diskType

      One of the available disk types for the restored disk (BALANCED for balanced persistent disks, EXTREME for extreme persistent disks, HDD for standard persistent disks, or SSD for SSD persistent disks). By default, the original disk type is used.

    • region

      Specifies the region. You can use it to define a different target region for the disk.

    • replicaZones

      An array listing the replica zones.

      For regional disks, by default only the same replica zone as in the path is added. You need to add the second zone.

  • networkInterfaces

    An array containing network interfaces. Each interface is a record with the following elements:

    • path

      The path to the network device.

    • externalIpType

      The external IP type for the network interface. You can select among the following options: NONE, EPHEMERAL, STATIC_RESERVED, STATIC_NEW.

    • externalIp

      The external IP value, if supported by the external IP type.

    • internalIpType

      The internal IP address type for the network interface. You can select among the following options: EPHEMERAL_AUTOMATIC, EPHEMERAL_CUSTOM, STATIC_RESERVED, STATIC_NEW.

    • internalIp

      The internal IP value, if supported by the internal IP type.

    The interfaces are selected in the following order:

    1. A legacy network with same name.
    2. Shared subnetworks that are accessible in destination projects.
    3. A subnetwork with the name "default".
    4. The first subnetwork in the specified region (sorted by name alphabetically).
  • Labels, metadata, and tags

    • metadata

      Custom metadata tags, consisting of a key and a value pair.

    • labels

      Labels for the restored disk, consisting of a key and a value pair.

    • tags

      An array of tags (strings).