Creating a Replication Policy

After a replication policy is configured, CBR will periodically replicate backups that have not been replicated or failed to be replicated to the destination region.

You can apply replication policies to server backup vaults, hybrid cloud backup vaults, and SFS Turbo backup vaults.

Background Information

When configuring the backup time and replication time, ensure that a replication task starts after a backup task is complete. Or, replication may fail.

Procedure

  1. Log in to CBR Console.

    1. Log in to the management console.
    2. Click in the upper left corner and select your region and project.
    3. Choose Storage > Cloud Backup and Recovery. Select a backup tab from the left navigation pane.

  2. Click the Replication Policies tab. In the upper right corner, click Create Policy. See Figure 1.

    Figure 1 Creating a replication policy

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

    Table 1 Replication policy parameter description

    Parameter

    Description

    Remarks

    Type

    Select a policy type. This section uses creating a replication policy as an example.

    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 will CBR automatically replicate backups in the vaults that have been associated with the policy and delete expired backups.

    Execution Time

    Execution times of the replication policy in a day

    Replication tasks can be scheduled at the beginning of each hour. Multiple selections are supported.

    00:00, 02:00

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

    Replication Frequency

    Dates for executing the replication task

    • 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 time is supposed to be on the day the replication policy is created. If the creation time of the replication policy is later than the latest execution time, the initial replication will be performed in the next replication cycle.

    Retention Rule

    Retention rules of replicas generated in the destination region

    • Replica quantity

      Specifies the maximum number of replicas allowed for a single 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 do not conflict. They will both be applied.

      • Day-based: The value ranges from 0 to 100.
      • Weekly: The value ranges from 0 to 100.
      • Monthly: The value ranges from 0 to 100.
      • Yearly: The value ranges from 0 to 100.

      For example, day-based advanced option retains the latest backup replica by day. Although the backup is replicated multiple times in a day, only the last replica of the current day is retained. If you set the value to 5, the system keeps the most recent replica from each of the last five days that have backup replicas generated. If there are more than five backup replicas, the system automatically deletes the earliest backup replicas. If the day-based, weekly, monthly, and yearly advanced options are all configured, the union backup replicas are selected for retention. For example, if the number of retained day-based backup replicas is set to 5 and the number of retained weekly backup replicas is set to 1, five backup replicas will be retained. The long-term retention rule and the quantity-based retention rule can be effective at the same time.

    • Time period

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

    • Permanent
      NOTE:
      • When the number of retained backup replicas exceeds the preset value, the system automatically deletes the earliest replicas. When the retention periods of retained replicas exceed the preset value, the system automatically deletes all expired replicas. By default, the system automatically clears data every other day.
      • This parameter applies only to replicas generated based on a scheduled replication policy. Those manually created replicas are not affected by this parameter and will not be automatically deleted. You can manually delete them from the backup list.
      • After a replica is used to create an image or file system, the replica will not be counted as a retained backup and will not be deleted automatically.

    6 months

    Destination Region

    Region to which the backup is replicated

    Only 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 master project of the region is selected by default. You can select another project if needed.

    CN North-Beijing4

    Enable Acceleration

    Whether to accelerate replication

    The acceleration function is billed by traffic.

    -

  4. Click Create Now.
  5. Locate the desired vault and choose More > Apply Replication Policy to apply the created replication policy to the vault. You can view the configured replication policy in the vault details.

    After the setting is successful, backups are periodically replicated to the destination vault based on the replication policy.

Example

A user applies a replication policy to a vault at 11:00 a.m. on Thursday in a given region. According to the policy, backups will be replicated to the destination region on 02:00 a.m. everyday, and two backup replicas will be retained. This vault also has a backup policy applied, which automatically creates two backups 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.