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.
In addition, you can configure replication rules in a backup policy so as to implement periodic replication of backups generated based on the backup policy to destination regions. Note that only backups that have not been replicated or that failed to be replicated can be replicated.
Context
- Automatic backup jobs require enabling the backup policy. The system automatically backs up servers associated with the backup policy and deletes expired backups.
- Each user can create a maximum of 32 backup policies.
- A maximum of 64 servers can be associated with a backup policy.
- When configuring the backup time and replication time, ensure that the replication job starts after the backup job is complete. Otherwise, replication may fail.
Procedure
- Log in to the CSBS management console.
- Log in to the management console.
- Under Storage > Cloud Server Backup Service.
- On the Policies tab page, click Create Backup Policy. See Figure 1.
- 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 servers 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 (1 to 99999) of days.
- Backup Quantity
Specifies the maximum allowed number of backups for a single ECS. The value ranges from 1 to 99999.
You can also set long-term retention rules. Long-term retention rules can be effective together with quantity-based retention rules.
- The value range for daily backup retention is 0 to 100.
- The value range for weekly backup retention is 0 to 100.
- The value range for monthly backup retention is 0 to 100.
- The value range for yearly backup retention is 0 to 100.
For example, if you select daily backup, the system retains the latest backup every day. Although the disk is backed up for multiple times in a day, only the last backup of the current day is retained. If you set the retention number to 5, the latest five daily backups are retained. If there are more than five backup files, the system automatically deletes the earliest backups. If the daily backup, weekly backup, monthly backup, and yearly backup are all configured, the union backups are selected for retention. The long-term retention rule and the backup quantity can be executed at the same time, not generating conflicts.
- 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.
- Enabled:
- Configure the replication policy. See Figure 2.
For details about replication restrictions, see Constraints and Limitations.
Table 2 lists the configuration parameters.
Table 2 Parameter description Parameter
Description
Remarks
Replication Policy
Whether to configure replication for the backup policy
Configure now
Status
Status of the replication policy
- Enabled:

- Disabled:

Only when the replication policy is enabled, the following configurations will take effect.
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 and you can select another project if needed.
CN South-Guangzhou
Execution Time
Execution times of the replication policy in a day
A maximum of 24 replication times can be set in a day. The replication interval must be one hour or more. If replication jobs are executed in two consecutive days, the interval between the execution times of the last replication in the former day and the first replication in the latter day must be one hour or more.
00:00, 12:00
Replication Period
Dates for executing the replication job
- Weekly
Specifies on which days of each week the replication job will be executed. You can select multiple days.
- Daily
Specifies the interval (every 1 to 30 days) for executing the replication job.
Every day
If you select Daily, the first replication time is supposed to be in the day when 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.
- Time Period
You can choose to retain replicas for one month, three months, six months, or one year, or for any desired number (1 to 99999) of days.
- Backup Quantity
Specifies the maximum allowed number of replicas for a single ECS. The value ranges from 1 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.
- This parameter applies only to replicas automatically scheduled by a replication policy. Those replicas generated by a manually executed replication policy 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, the replica will not be counted as a retained backup and will not be deleted automatically.
6 months
- Enabled:
- Click OK.
- In the row of the backup policy, click Associate Server. See Figure 3.
- In the available server list, select the servers you want to associate. After servers are selected, they are added to the list of selected servers.
- A maximum of 64 servers can be associated with a backup policy.
- If a selected server 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 a server 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.
- CSBS supports backing up ECSs with shared EVS disks.
- You can only select servers that are in the Running or Stopped state.
- Click OK.
Last Article: Backup Policies
Next Article: Editing a Backup Policy



Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.