To prevent data loss or corruption due to disasters, hardware failures, or accidental deletion, we recommend that you use Cloud Backup to back up your SQL Server database in a timely manner. You can use Cloud Backup to back up SQL Server databases that are deployed on Elastic Compute Service (ECS) instances or on-premises servers to the cloud. You can restore the data of an SQL Server database to the source database or another ECS-hosted database within the same region based on recovery points. This topic describes how to back up an SQL Server database.
Prerequisites
Cloud Backup is activated. You are not charged for activating Cloud Backup. You are charged for using the database backup feature of Cloud Backup based on the following billable items:
Rental of database backup vaults. You are not charged for using a vault in the first 30 days. You are charged after the free-trial period ends. You can store data from various databases.
Storage usage of database backup vaults. You are charged for the backup storage based on the storage space occupied by the data that is deduplicated and compressed. A free capacity of 100 GB is provided for each backup vault per month. After the free quota is used up, you are charged based on tiered pricing.
NoteYou are not charged for using Cloud Backup if you only register an SQL Server database in the Cloud Backup console.
For more information, see Pricing of Cloud Backup.
Cloud Assistant Agent is installed on the ECS instance that hosts the database.
A Cloud Backup client for ECS must be used together with Cloud Assistant.
If you purchased the ECS instance before December 1, 2017, you must manually install Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent.
If you purchased the ECS instance on or after December 1, 2017, Cloud Assistant Agent is pre-installed.
An SQL Server database is registered. For more information, see Register an ECS-hosted SQL Server database or Register an on-premises SQL Server database.
Usage notes
You are not charged for using Cloud Backup if you only register an SQL Server database in the Cloud Backup console.
Cloud Backup supports a limited number of database versions, operating systems, and backup features. For more information, see the "Supported database versions" section in Overview (ECS-hosted databases).
You must make sure that .NET Framework 4.5 or later is installed on the ECS instance.
If the compression feature is enabled for a file system, the files of an SQL Server database cannot be stored in the file system. For more information, see File Locations for Default and Named Instances of SQL Server.
If an SQL Server database uses the simple recovery model, Log Backup is not supported. You can select Full Backup or Cumulative Incremental Backup.
If you are using a master database, Cumulative Incremental Backup and Log Backup are not supported. You can select only Full Backup.
On-premises database servers must be connected to virtual private clouds (VPCs) by using virtual private networks (VPNs) or Express Connect circuits. You must also make sure that you can use a Cloud Backup client to access one of the following CIDR blocks from an on-premises server: 100.64.0.0/10, 100.64.0.0/11, and 100.96.0.0/11. For more information, see Connect a VPC to a data center in single-tunnel mode.
When you create a backup plan, select a proper backup vault to avoid backing up data from one database to different backup vaults. We recommend that you back up a database instance to only one backup vault. If you back up a database instance to different backup vaults, incremental or log backups may be converted to full backups, which occupies additional storage space in the backup vaults.
If you use other backup software or scripts to perform a full backup, Cloud Backup may convert the next differential backup or log backup to a full backup. As a result, you are charged for additional backup storage. However, you can use Cloud Backup and other backup software or scripts to perform differential backups or log backups at the same time.
If you back up an SQL Server 2019 database by using Cloud Backup and other backup software or scripts at the same time, you may not be able to view the database details. When you create or edit a backup plan and select a database instance, the FailedToListUniBackupInstanceDetail error occurs. For more information, see What do I do if I am unable to view database details when I back up an SQL Server 2019 database?
If an SQL Server database uses the full recovery model, log truncation is triggered only when a log backup is performed after the SQL Server instance is logged off and the SQL Server backup plan (including log backup) is deleted. In addition, you need to pay close attention to the growth of transaction logs to prevent excessive log files from occupying storage space and affecting normal business operations. For more information, see View or change the recovery model of a database (SQL Server).
Create a backup plan for the SQL Server database
After you register an SQL Server database, you must create a backup plan for the database. Cloud Backup backs up the database based on the backup plan that you configure. To create a backup plan, perform the following steps:
Log on to the Cloud Backup console.
On the Database Backup page, click the SQL Server tab.
Click the ECS Database Instance or Local Database Instance tab.
Find the SQL Server database for which you want to create a backup plan, and click Back Up in the Actions column.
In the Create Backup Plan panel, perform the following steps:
Configure the backup parameters and click Next.
Specify Plan Name.
Select the SQL Server database that you want to back up.
Configure the backup plan and click Next.
Parameter
Description
Recommended Plan
The recommended backup plan. Cloud Backup provides the following preconfigured backup policies. You can select a backup policy based on your business requirements or create a custom backup policy.
Typical Plan: enables the Full Backup and Cumulative Incremental Backup features.
Critical Application: enables the Full Backup, Cumulative Incremental Backup, and Log Backup features.
Customize: enables a custom backup policy.
Full Backup
If you select Full Backup, all the database files in the operating system are backed up.
You can back up files immediately or at a specified point in time. You can also schedule periodic backups by hour, day, week, or month.
Cumulative Incremental Backup
If you select Cumulative Incremental Backup, all incremental database files in the operating system are backed up.
You can back up files immediately or at a specified point in time. You can also schedule periodic backups by hour, day, week, or month.
ImportantWhen Cloud Backup clears expired backup files, cumulative incremental backup files are considered as normal incremental backup files. An incremental backup file depends on the most recent incremental and full backup files. Therefore, the incremental backup file is retained until the incremental and full backup files on which it depends are deleted. When all the full and cumulative incremental backup files on which the cumulative incremental backup file depends are deleted, Cloud Backup deletes the cumulative incremental backup file. We recommend that you configure a reasonable backup cycle and expiration time. For more information, see How does Cloud Backup clear expired database backup files?
Log Backup
If you select Log Backup, database logs are backed up. You can restore the logs to a specific point in time.
You can back up files immediately or at a specified point in time. You can also schedule periodic backups by minute (minimum cycle: 10 minutes), hour, day, week, or month.
NoteTo restore data to a specified point in time, you must enable log backup.
ImportantTo restore a log backup file, Cloud Backup must obtain the most recent full backup file. Therefore, the full backup file is not recycled until the log backup file expires. We recommend that you configure a reasonable backup cycle and expiration time. For more information, see How does Cloud Backup clear expired database backup files?
Configure the backup settings and click Next.
You can specify the number of concurrent threads, the retry time, and the limit of the backup speed.
Parameter
Description
Concurrent Threads
The number of concurrent threads that are used to back up files.
Retry Time
The time interval between two consecutive reconnection attempts if the database is disconnected during backup. Unit: minutes.
Speed Limit
The maximum size of data that is backed up per second. Unit: MB/s. The value 0 indicates that the speed is unlimited.
Configure a backup vault and then click OK.
ImportantYou can back up a database instance to only one backup vault.
Parameter
Description
Backup Vault
The backup vault to which you want to store the backup data. Valid values:
Create Vault: If you select this option, specify a name for the backup vault in the Vault Name field. If you do not configure this parameter, a random name is specified.
Select Vault: If you select this option, select a backup vault from the Vault Name drop-down list.
ImportantAfter a backup vault is created, you are charged for the backup vault regardless of whether backup data is generated. For more information, see Billing methods and billable items.
To maximize the redundancy of your backup data, Cloud Backup uses zone-redundant storage (ZRS)-enabled backup vaults by default in regions that support ZRS-enabled backup vaults. For regions that support only locally redundant storage (LRS)-enabled backup vaults, Cloud Backup uses LRS-enabled backup vaults. You do not need to manually select a backup vault type.
Vault Name
The name of the backup vault.
Backup Retention Period
The retention period of the backup data. Unit: days, weeks, months, or years. After the retention period expires, the backup data is automatically deleted.
You can change the retention period on the Storage Vaults page. This change takes effect on all newly generated backup data in the backup vault.
ImportantTo restore a cumulative incremental backup file or log backup file, Cloud Backup must obtain the most recent full backup file. Therefore, the full backup file is not recycled until the cumulative incremental backup file or log backup file expires. We recommend that you configure a reasonable backup cycle and expiration time. For more information, see How does Cloud Backup clear expired database backup files?
The backup plan is created.
Backup is successful
A full backup is a prerequisite for an incremental backup. You must manually perform a full backup.
After the backup plan is created, you can view the backup plan details on the Backup Plans tab. The details include the next execution time and backup intervals for the full backup, incremental backup, and log backup. Cloud Backup backs up the SQL Server database from the specified start time at the specified interval.
When the backup execution time is reached, Cloud Backup runs the backup plan. If the Status of a backup job is Idle and the time for Next Run is displayed, the backup job is completed.
More operations
On the Backup Plan tab, find the backup plan. In the Actions column, you can perform the following operations:
Modify a backup plan
If a backup plan cannot meet your requirements, you can click Edit to modify the backup plan.
Configure alert settings
You can choose
in the Actions column and then select a backup alert policy. The following table describes the alert policies.Alert policy
Description
Disabled
The Cloud Backup client does not send alert notifications.
Same as Backup Vault
The Cloud Backup client sends alert notifications by using the same method configured for the backup vault.
Default
The Cloud Backup client sends alert notifications to the owner of the Alibaba Cloud account by using emails.
Custom
If you select this option, you must select one or more alert contacts or alert contact groups. If an alert is triggered, the Cloud Backup client sends alert notifications to the selected alert contacts or alert contact groups.
Delete a backup plan
If you delete a backup plan, all backup and restore jobs that are being performed by the client fail.
To delete a backup plan, find the backup plan and choose
in the Actions column.
What to do next
FAQ
References
For more information about the benefits, working mechanisms, procedures, and limits of the database backup feature, see Overview (ECS-hosted databases) and Overview (on-premises databases).
Cloud Backup provides resource plans for various backup scenarios so that you can enjoy higher discounts and minimize your costs. For more information, see Purchase resource plans.