Updated on 2023-06-16 GMT+08:00

Configuring Cross-Region Backup

Scenarios

If both the production site and the cross-AZ DR site become unavailable due to a regional disaster such as an earthquake, you can use CBR for cross-region DR.

Specifically, CBR periodically backs up the servers and disks associated with a vault based on a backup policy, and then replicates the backups to the cross-region DR site based on a replication policy. If both the production site and the cross-AZ DR site fail, you can restore services at the cross-region DR site with only a few clicks.

The procedure of setting up cross-region DR with CBR is as follows:

  1. Creating a Backup Policy
  2. Purchasing a Server Backup Vault and Applying the Backup Policy
  3. Creating a Replication Policy
  4. Purchasing a Server Replication Vault and Applying the Replication Policy

Constraints and Limitations

  • Each user can create a maximum of 32 backup policies and 32 replication policies.
  • A maximum of 64 ECSs can be associated with a backup policy.
  • Automatic backup jobs require enabling the backup policy. The system automatically backs up ECSs associated with the backup policy and deletes expired backups.

Prerequisites

Creating a Backup Policy

  1. Log in to the management console.
  2. Click in the upper left corner and select the region and project of the production site.
  3. Click Service List and choose Storage > Cloud Backup and Recovery > Policies.
  4. Click Create Policy in the upper right corner. On the displayed page, click Backup policy to create a custom backup policy. See Figure 1.

    Figure 1 Creating a backup policy

  5. Set the backup policy parameters Table 1 describes the parameters.

    Table 1 Backup policy parameter description

    Parameter

    Description

    Example Value

    Type

    Type of the policy. In this section, we select the backup policy as an example.

    Backup policy

    Name

    Backup policy name

    A name must contain 1 to 64 characters including digits, letters, underscores (_), or hyphens (-).

    backup_policy

    Status

    Whether to enable the backup policy.

    Only after a backup policy is enabled and applied will CBR automatically backs up the vault resources and deletes expired backups.

    Backup Frequency

    Select a backup frequency.

    • Weekly

      Defines on which days of each week the backup task will be executed. You can select multiple days.

    • Day based

      Defines the interval (every 1 to 30 days) for executing the backup task.

    Every day

    If you select day-based backup, the first backup is supposed to be executed on the day when the backup policy is created. If the execution time on the day you create the backup policy has passed, the first backup will be executed in the next backup cycle.

    It is recommended that backups be performed during off-peak hours or when no services are running.

    Execution Time

    Execution times of the backup policy in a day

    Backups can be scheduled at the beginning of each hour, and you can select multiple hours.

    NOTICE:

    If a large amount of data needs to be backed up, you are advised to make backup less frequent to prevent the system from skipping any execution time.

    For example, a disk is scheduled to be backed up at 00:00, 01:00, and 02:00. A backup task starts at 00:00. Because a large amount of incremental data needs to be backed up or a heap of backup tasks are executed at the same time, this backup task takes 90 minutes and completes at 01:30. The system performs the next backup at 02:00. In this case, only two backups are generated in total, one at 00:00, and the other at 02:00.

    00:00, 02:00

    It is recommended that backups be performed during off-peak hours or when no services are running.

    Retention Rule

    Defines how backups will be retained

    • Time period

      You can choose to retain backups for one month, three months, six months, one year, or for any desired number (2 to 99999) of days.

    • Backup quantity

      You can set the maximum number of cloud server backups to retain for one cloud server. The value ranges from 2 to 99999.

    • You can also set long-term retention rules with advanced options. Long-term retention rules and quantity-based retention rules will be both applied.

      • Day-based: 0–100
      • Weekly: 0–100
      • Monthly: 0–100
      • Yearly: 0–100

      A resource may be backed up multiple times in a day. If day-based backup is configured, only the most recent backup of that day is retained. If you set Day-based to 5, the most recent backup of each of the last five days that have backups generated will be retained and the earliest backups will be deleted automatically. If day-based, weekly, monthly, and yearly retention rules are all configured, all the rules will apply and the union set of backup replicas will be retained. For example, if Day-based is set to 5 and Weekly to 1, five backup replicas will be retained. The long-term retention rule and the quantity-based retention rule both apply.

    • Permanent
      NOTE:
      • The system automatically deletes the earliest and expired backups every other day to avoid exceeding the maximum number of backups to retain or retaining any backup longer than the maximum retention period.
      • The retention rules apply only to auto-generated backups, but not manual backups. Manual backups need to be deleted manually.
      • After a backup is used to create an image, the backup will not be deleted by the retention rule.
      • A maximum of 10 backups are retained for failed periodic backup tasks. They are retained for one month and can be deleted manually.

    6 months

    More frequent backups create more backups or retain backups for a longer time, protecting data to a greater extent but occupying more storage space. Set an appropriate backup frequency as needed.

  6. Click OK.

Purchasing a Server Backup Vault and Applying the Backup Policy

  1. Log in to CBR Console. In the navigation pane on the left, choose Cloud Server Backup.
  2. In the upper right corner of the page, click Buy Server Backup Vault.
  3. Set Protection Type to Backup.

    A server backup vault stores server backups.

    If you need to purchase a replication vault to store the generated backup replicas, set Protection Type to Replication (cross-region).

  4. Configure application-consistent backup.

    • If application-consistent backup is enabled, the vault can be used to store database backups. For example, you can back up ECSs running MySQL or SAP HANA databases, because application-consistent backup ensures that the backed-up data is transactionally consistent. If an application-consistent backup task fails, CBR automatically performs a non-database server backup task instead. This non-database server backup will be stored in the database server backup vault.
    • If application-consistent backup is not enabled, only non-database server backup is performed on associated servers, which is usually used for ECSs not running databases.

  5. Click Configure for Associate Server. In the displayed server list, select the servers or disks that you want to back up.

    After the servers or disks are selected, they are added to the list of selected servers. For details, see Figure 2. You can also select specific disks on a server and associate them with the vault.

    To avoid data inconsistency after restoration, you are advised to back up the entire server.

    If you want to back up only some of the disks to reduce costs, ensure that the data on the backed-up disks does not depend on the disks that are not backed up. Or, data inconsistency may occur.

    For example, the data of an Oracle database is scattered across different disks. If only some of the disks are backed up, restoration restores only the data of the disks that have been backed up, with data on the rest of the disks unchanged. As a result, the data may be inconsistent and the Oracle database may fail to start.

    Figure 2 Selecting servers
    • The selected servers must be in the Running or Stopped state.

  6. Specify the vault capacity.

    Its value ranges from the total size of the associated servers to 10,485,760 GB. You need to properly plan the vault capacity, which must be at least the same as the size of the servers you want to back up. Also, if automatic association is enabled and a backup policy is applied to the vault, more capacity is required. As the vault's used space grows, you can expand the vault capacity if it becomes insufficient.

  7. Click Configure for Auto Backup and select a backup policy from the drop-down list.

    The backup policy will be applied to this vault, and all servers associated with this vault will be automatically backed up based on the policy.

  8. If you have subscribed to the Enterprise Project Management Service (EPS), add the vault to an existing enterprise project.

    EPS provides a unified method to manage cloud resources by project, allowing you to manage resources, users, and user groups in your projects. The default enterprise project is default.

    If the CBR FullAccess permissions have been assigned to IAM users, enterprise projects will not be displayed for you to choose from when you create a vault. Go to the Enterprise Project Management console and assign the CBR FullAccess permissions to the target user group.

  9. (Optional) Add tags to the vault.

    Tags are key-value pairs, which are used to identify, classify, and search for vaults. Vault tags are used to filter and manage vaults only. A vault can have a maximum of 10 tags.

    Table 2 describes the tag parameters.
    Table 2 Tag parameter description

    Parameter

    Description

    Example Value

    Key

    Each tag has a unique key. You can customize a key or select the key of an existing tag created in TMS.

    A tag key:

    • Contains 1 to 36 Unicode characters.
    • Can contain only letters, digits, hyphens (-), and underscores (_).

    Key_0001

    Value

    A tag value can be repetitive or left blank.

    A tag value:

    • Contains 0 to 43 Unicode characters.
    • Can contain only letters, digits, hyphens (-), and underscores (_).

    Value_0001

  10. Specify a name for the vault.

    The name must contain 1 to 64 characters including digits, letters, underscores (_), or hyphens (-), for example, vault-f61e.

    You can also use the default name vault_xxxx.

  11. Pay for the order as prompted.
  12. Go back to the Cloud Server Backup page. You can view the created vault in the vault list.

    You can associate servers with the vault and perform backup for the servers. For details, see Vault Management.

Creating a Replication Policy

  1. Log in to CBR Console. In the navigation pane on the left, choose Policies.
  2. Click Create Policy in the upper right corner. On the displayed page, click Replication policy to create a custom replication policy. See Figure 3.

    Figure 3 Creating a replication policy

  3. Set the replication policy and Create Now.

Purchasing a Server Replication Vault and Applying the Replication Policy

  1. Log in to CBR Console. In the navigation pane on the left, choose Cloud Server Backup.
  2. Click in the upper left corner and select the region and project of the cross-region DR site.
  3. Click Buy Server Backup Vault in the upper right corner of the page. For details, see 1 to 12 in Purchasing a Server Backup Vault and Applying the Backup Policy.
  4. Click in the upper left corner and select the region and project of the production site.
  5. On the Vaults tab page, locate the row that contains the target vault, click More in the Operation column, and choose Apply Replication Policy.

    The Apply Replication Policy dialog box is displayed.

    The backup policy has been applied to the server backup vault when you purchase the vault. Now you only need to apply the replication policy.

  6. In the displayed dialog box, select the created replication policy and select the replication vault at the cross-region DR site as the destination vault.

    Figure 4 Applying a replication policy

  7. Confirm the information and click OK.
  8. Go to the Policies page and view the policy status.