Updated on 2022-04-08 GMT+08:00

Creating a Backup Policy

A backup policy can drive the system to automatically execute CSBS backup jobs at the specified interval. Periodic backups can be used to restore data quickly against data corruption or loss.

Context

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

Procedure

  1. Log in to the CSBS management console.

    1. Log in to the management console.
    2. Under Storage > Cloud Server Backup Service.

  2. On the Policies tab page, click Create Backup Policy. SeeFigure 1.

    Figure 1 Creating a backup policy

  3. Set the backup policy parameters according to Table 1.

    Table 1 Parameter description

    Parameter

    Description

    Remarks

    Name

    Backup policy name.

    It is a string of 1 to 255 characters that can contain only digits, letters, underscores (_), and hyphens (-).

    backup_policy

    Status

    Whether to enable the backup policy.

    • Enabled:
    • Disabled:

    Only after the backup policy is enabled, the system automatically backs up ECSs associated with the backup policy and deletes expired backups.

    Application-Consistent Backup

    If selected, the system will perform application-consistent backups. If you select Continue to back up data after the application-consistent backup fails. at the same time, the system will perform crash-consistent backup if the application-consistent backup job fails. Otherwise, the whole backup operation fails.

    NOTE:

    Before using application-consistent backup, change the security group and install the Agent. For details, see Enabling Application-Consistent Backup.

    -

    Execution Time

    Execution time of the backup policy in a day

    A maximum of 24 backup times can be set in a day. The backup interval must be one hour or more. If backup jobs are executed in two consecutive days, the interval between the execution times of the last backup of the former day and the first backup of the latter day must be one hour or more.

    00:00, 02:00

    It is recommended that backup jobs be executed during off-peak hours or when there are no services running.

    Backup Period

    Dates for executing the backup job.

    • Weekly

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

    • Daily

      Specifies the interval (every 1 to 30 days) for executing the backup job.

    Every day

    If you select Daily, the first backup time is supposed to be in the day when the backup policy is created. If the creation time of the backup policy is later than the latest execution time, the initial backup will be performed in the next backup cycle.

    It is recommended that backup jobs be executed during off-peak hours or when there are no services running.

    Retention Rule

    Rule that specifies how backups will be retained.

    • Time Period

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

    • Backup Quantity

      Specifies the maximum allowed number of backups for a single ECS. The value ranges from 2 to 99999.

    • Permanent
      NOTE:
      • When the number of retained backups exceeds the preset value, the system automatically deletes the earliest backups. When the retention periods of retained backups exceed the preset value, the system automatically deletes all expired backups. By default, the system automatically clears data every other day. The deleted backup does not affect other backups for restoration.
      • This parameter applies only to backups automatically scheduled by a backup policy. Those backups generated by a manually executed backup policy are not affected by this parameter and are not automatically deleted. You can manually delete them from the backup list.
      • After a backup is used to create an image, the backup will not be counted as a retained backup and will not be deleted automatically.
      • A maximum of 10 backups are retained for failed periodic backup jobs. They are retained for one month and can be manually deleted.

    6 months

    More frequent backup intervals create more backups or retain backups for a longer time, protecting data with a higher level but occupying more storage space. Set an appropriate backup period as required.

  4. Click OK.
  5. In the row of the backup policy, click Associate Server. See Figure 2.

    Figure 2 Associating servers

  6. In the available server list, select the ECSs you want to associate. After ECSs are selected, they are added to the list of selected servers.

    • A maximum of 64 ECSs can be associated with a backup policy.
    • If a selected ECS has been associated with another backup policy, it will be disassociated from the original backup policy automatically and then associated with the new backup policy.
    • If EVS disks on an ECS have been associated with a VBS backup policy, disassociate them from the VBS backup policy. Otherwise, two backups are generated for each of the EVS disks.
    • An ECS with shared EVS disks cannot be associated with a backup policy.
    • You can only select ECSs that are in the Running or Stopped state.

  7. Click OK.