Updated on 2024-02-05 GMT+08:00

Creating a Replication Policy

A replication policy allows CBR to periodically replicate backups that have not been replicated or failed to be replicated to the destination region.

When a backup time and a replication time are both configured, ensure that replication starts after backup is complete. Or, replication may fail.

Constraints

  • You can only apply replication policies to server backup vaults.

Procedure

  1. Log in to the CBR console.

    1. Log in to the management console.
    2. Click in the upper left corner and select a region.
    3. Click and choose Storage > Cloud Backup and Recovery.

  2. Choose Policies in the left navigation pane and click the Replication Policies tab. In the upper right corner, click Create Policy.

  3. Set the replication policy parameters. Table 1 describes the parameters.

    Table 1 Replication policy parameters

    Parameter

    Description

    Example Value

    Type

    Select a policy type. In this section, we select the replication policy.

    Replication policy

    Name

    Replication policy name

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

    replication_policy

    Status

    Whether to enable the replication policy

    Only after a replication policy is enabled and applied will CBR automatically replicates the backups in the vaults and deletes expired backup replicas.

    Execution Time

    Execution times of the replication policy in a day

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

    00:00, 02:00

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

    Replication Frequency

    Select a replication frequency.

    • Weekly

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

    • Day based

      Specifies the interval (every 1 to 30 days) for executing the replication task.

    Every day

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

    Retention Rule

    Rule that specifies how backup replicas will be retained in the destination region

    • Replica quantity

      You can set the maximum number of backup replicas to retain for each resource. The value ranges from 2 to 99999.

    • Time period

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

    • Permanent
      NOTE:
      • The system automatically deletes the earliest and expired backup replicas every other day to avoid exceeding the maximum number of backup replicas to retain or retaining any backup replica longer than the maximum retention period.
      • There will be delays for CBR to delete expired backup replicas, but normally these delays will not be over 24 hours.
      • The retention rules apply only to auto-generated backup replicas, but not manual ones. Manual backup replicas need to be deleted manually.
      • After a backup replica is used to create an image, the replica will not be deleted by the retention rule.

    6 months

    Destination Region

    Region to which backups are replicated

    Only the regions that support replication will be displayed.

    • If the selected region contains only one project, you can directly select the region name.
    • If the selected region has multiple projects, the default project of the region is preselected. You can select another project if needed.

    -

  4. Click Create Now.
  5. Locate the desired vault and choose More > Apply Replication Policy to apply the replication policy to the vault. Then you can view the applied policy on the vault details page.

    After the policy is applied, backups will be periodically replicated to the destination vault based on the policy.

Example

A user applies a replication policy to a vault in a given region at 11:00 a.m. on Thursday. According to this policy, backups will be replicated to the destination region on 02:00 a.m. everyday, and only two backup replicas will be retained. According to this vault's backup policy, two backups are automatically generated at 00:00 everyday. At 12:00 p.m. on Saturday, the replication vault will contain two backup replicas, which are replicated on Saturday. Backup replicas generated at 02:00 a.m. on Friday have been automatically deleted according to the replication policy.