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 configuring bucket backup options.

Backup options

Backup option Description
Pre/post scripts Enables you to specify the pre-backup and post-backup scripts to perform necessary actions before and/or after the backup of a bucket is performed.
Temporary instance configuration Enables you to specify the location and the subnet where you want R‑Cloud to create a temporary instance during the backup. For Amazon S3 buckets, you can also specify the security group for the temporary instance. By default, the temporary instance is created in the original or Google Cloud project of the bucket.

Prerequisites

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

    • The #!/usr/bin/env python3 header must be specified in the script.

    • For Google Cloud:

      • The HYCU Managed Service Account (HMSA) must have access to the bucket where the script is located.

      • 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'
  • Only if you plan to configure backup options for multiple buckets. All buckets must have the same values set for each option that you plan to configure.

Limitations

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

  • Only Python scripts are supported.

  • For AWS: The pre-backup and post-backup scripts must be located in the same account and in the same region as the bucket.

  • For Google Cloud: Only the googleapiclient Python library can be used for making Google Cloud API calls.

Considerations

Only if you plan to configure the temporary instance. If not specified otherwise, the temporary instance will be created:

  • For AWS: In the same region as the bucket (for example, US-EAST-1).

  • For Google Cloud: In the following region (based on the location type of the bucket):

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

      Dual-region name Temporary instance region
      ASIA1 ASIA-NORTHEAST1
      EUR4 EUROPE-NORTH1
      NAM4 US-CENTRAL1
    • The 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 buckets for which you want to configure backup options.

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

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

    • Only if you want to specify the pre-backup and post-backup scripts. On the Pre/post Scripts tab, 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 R‑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 R‑Cloud will run immediately after it performs the backup of the bucket.

      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:

      • For AWS: s3://bucket-name/script.py parameter1 parameter2 ...

      • For Google Cloud: gs://bucket-name/script.py parameter1 parameter2 ...

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

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

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

      storage = googleapiclient.discovery.build('storage', 'v1')
    • Only if you want to configure the temporary instance. On the Temporary Instance Configuration tab, provide the following information:

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

        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 Amazon S3 or Google Cloud pricing.

      2. 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.

      3. For Amazon S3 buckets: Optionally, from the Security Group drop-down menu, select the preferred security group. By default, the temporary instance is created in the default security group of the preferred subnet.

  4. Click Save.