You can use Cloud Backup to back up SQL Server databases that are deployed on Elastic Compute Service (ECS) instances or on-premises servers. You can also restore the databases based on your business requirements. This topic describes how to back up an SQL Server database.
Prerequisites
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.
Precautions
You must make sure that .NET Framework 4.5 or later is installed on the ECS instance.
Some versions of SQL Server databases cannot be backed up by using Cloud Backup. For more information, see Overview (ECS-hosted databases).
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 mode, 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.
Create a backup plan
After you register an SQL Server instance, you must create a backup plan in the Cloud Backup console to back up the instance. To create a backup plan, perform the following steps:
Log on to the Cloud Backup console.
In the left-side navigation pane, choose .
In the top navigation bar, select a region.
On the Database Backup page, click SQL Server.
Click the ECS Database Instance or Local Database Instance tab.
On the page that appears, click the SQL Server Instance tab. On this tab, find the SQL Server instance and click Back Up in the Actions column.
In the Create Backup Plan panel, perform the following steps:
Specify a name for the backup plan, select the objects that you want to back up, and then click Next.
Specify Plan Name.
Select the SQL server instance that you need to back up.
Configure the backup plan and click Next.
Parameter
Description
Recommended Plan
The recommended backup plan. Default value: Typical Plan.
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.
However, you can restore the files to only the point in time at which the files 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. A custom backup plan is supported.
Cumulative Incremental Backup
If you select Cumulative Incremental Backup, all incremental database files in the operating system are backed up.
However, you can restore the files to only the point in time at which the files 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. A custom backup plan is supported.
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 hour, day, week, or month. A custom backup plan is supported.
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.
Select a backup vault and click OK.
ImportantYou can back up an 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 ZRS-enabled backup vaults by default in regions that support ZRS-enabled backup vaults. If only LRS-enabled backup vaults are available in the region where the backup vaults are located, 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.
Retention Period
The retention period of the backup data. Unit: days, weeks, months, or years.
You can change the backup 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?
Related operations
On the Backup Plan tab, find the backup plan. In the Actions column, you can click buttons to perform the following operations:
Modify a backup plan
If a backup plan does not meet your requirements, you can click Edit to modify the backup plan.
Configure alerts
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 backup client does not send alert notifications.
Same as Backup Vault
The backup client sends alert notifications based on the alert settings that are specified for the backup vault.
Default
The 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 contacts or contact groups. Then, the backup client sends alert notifications to the selected contacts or contact groups.
Delete a backup plan
If you delete a backup plan, all backup and restoration jobs that are being performed based on the backup plan are interrupted.
To delete a backup plan, find the backup plan and choose
in the Actions column.