Configuring bucket backup options

Before you start protecting data in buckets, you can adjust bucket protection to the needs of your data protection environment by using bucket backup options.

Backup option Description
Specifying the temporary instance location and subnet You can specify the location and the subnet where you want HYCU for Google Cloud to create a temporary instance during the backup. By default, the temporary instance is created in the original project of the bucket.
Running pre/post scripts You can specify the pre-backup and post-backup scripts to perform necessary actions before and after the backup of the bucket is performed.

Prerequisites

Only if you plan to specify pre-backup and post-backup scripts.

  • The HYCU Managed Service Account (HMSA) must have access to the bucket where the script is located.
  • The #!/usr/bin/env python3 header must be specified in the script.

  • Only if using a service account for running the scripts. The following line of code must be present in the script:

    os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/tmp/hycu/serviceAccount.json'

Limitations

Only if you plan to specify pre-backup and post-backup scripts.

  • Currently, only Python scripts are supported.
  • Only the googleapiclient Python library can be used for making Google Cloud API calls.

Consideration

Only when specifying the location or the subnet for a temporary instance. If not specified otherwise, the temporary instance will be created in the following region (based on the location type of the bucket):

  • A region: In the same region as the bucket (for example, US-CENTRAL1).
  • A dual-region:

    Dual-region name Temporary instance region
    ASIA1 ASIA-NORTHEAST1
    EUR4 EUROPE-NORTH1
    NAM4 US-CENTRAL1
  • A multi-region:

    Multi-region name Temporary instance region
    ASIA ASIA-EAST1
    EU EUROPE-WEST1
    US US-CENTRAL1

Procedure

  1. In the Buckets panel, select the bucket for which you want to configure backup options.

  2. Click  Configuration. The Bucket Configuration dialog box opens.

  3. Depending on what you want to do, provide the required information:

    • Specify the region, the zone, and the subnet where you want HYCU for Google Cloud to create a temporary instance:

      1. From the Region drop-down menu, select the preferred region.

        n Note  It is recommended that you select the same region as the one where the bucket resides. Otherwise, you will be charged for outbound data transfer. For details, see Google Cloud pricing.

      2. From the Zone drop-down menu, select the preferred zone.

      3. From the Subnet drop-down menu, select the preferred subnet. By default, the temporary instance is created in the default subnet of the preferred region and zone.

        i Important  A policy cannot be assigned to a bucket on which HYCU for Google Cloud could not detect the subnet.

    • Specify the scripts to perform necessary actions before and/or after the backup of the bucket is performed:

      • In the Pre‑backup script field, enter the path to the script that HYCU for Google Cloud will run just before it performs the backup of the bucket.
      • In the Post‑backup script field, enter the path to the script that HYCU for Google Cloud will run immediately after it performs the backup of the bucket.

      i Important  When entering the path to the script, make sure to enter it correctly, including lowercase and uppercase letters, as the path is case sensitive. You must specify the path in the following format:

      gs://bucket-name/script.py parameter1 parameter2 ...

      Example  The following is an example of the first lines of a pre-backup script:

      #!/usr/bin/env python3
      import os
      import googleapiclient.discovery

      os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/tmp/hycu/serviceAccount.json'

      storage = googleapiclient.discovery.build('storage', 'v1')
  4. Click Save.