Database Backup (DBS) provides features such as full backup, incremental backup, and data restoration. This topic describes how to use the physical backup method to back up an SQL Server database.
- The version of the database is SQL Server 2019, SQL Server 2017, SQL Server 2016,
SQL Server 2014, SQL Server 2012, SQL Server 2008R2, SQL Server 2005, or SQL Server
Note Only self-managed SQL Server databases that are deployed on premises or on cloud servers are supported. ApsaraDB RDS for SQL Server instances are not supported.
- A backup gateway is installed. For more information, see Add a backup gateway.
Note For more information about backup methods, see Backup methods.
Create a backup schedule
Configure the backup schedule
- Log on to the DBS console.
- In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page, select a region in the upper-left corner.
- On the Backup Schedules page, find the backup schedule that you want to configure and click Configure Backup Schedule in the Actions column.
- In the Configure Backup Source and Destination step of the Configure Backup Schedule wizard, configure the backup source and destination.
Then, click Next in the lower-right corner of the page.
Section Parameter Description N/A Schedule Name The name of the backup schedule. DBS generates a backup schedule name. We recommend that you set a descriptive name that is easy to identify. Backup schedule names do not have to be unique. Backup Source Information Backup Mode The method that is used to back up data. By default, the backup method that you select when you purchase the backup schedule is used. In this example, the physical backup method is used. Instance Region
The region in which the database that you want to back up is deployed. The backup gateway must reside in the same region.Backup Gateways
Backup Gateway The backup gateway that is installed to back up data. For more information about how to install a backup gateway, see Add a backup gateway. Database Type The type of the database that you want to back up. Default value: SQLServer. Address The endpoint that is used to connect to the database that you want to back up. Default value:
Port Number The port number that is used to connect to the database that you want to back up. Default value:
Backup Destination Information Backup Storage Type The type of storage that is used to store the backup data. Valid values:
Note In this example, set this parameter to DBS Storage (recommended). If you set this parameter to OSS For User, you must set the OSS Bucket Name parameter.
- DBS Storage (recommended): Backup data is stored in DBS without requiring you to create storage space. You
are charged based on the volume of your data that is stored in DBS. For more information
about the billing method, see Storage fees.
To reduce storage costs, we recommend that you use subscription storage plans. For more information, see Use storage plans.
- OSS For User: You must create a bucket in the Object Storage Service (OSS) console in advance. For more information, see Create buckets.
Storage Encryption The method that is used to encrypt the stored data. Valid values:
- Encrypted: recommended. DBS uses AES-256, one of the advanced encryption standard ciphers,
to encrypt the stored data.
The server-side encryption feature is used in OSS. When you upload an object to a bucket for which server-side encryption is enabled, OSS encrypts and stores the object. When you download the encrypted object from OSS, OSS decrypts the object and returns the decrypted object to you. For more information, see Server-side encryption.
- Non-encrypted: The backup data is not encrypted.
- DBS Storage (recommended): Backup data is stored in DBS without requiring you to create storage space. You are charged based on the volume of your data that is stored in DBS. For more information about the billing method, see Storage fees.
- In the Edit Backup Objects step, find the database or table that you want to back up in the Available section.
Click the right arrow to add the selected database or table to the Selected section. Then, click Next. Note
- If the Available section is empty, troubleshoot the permission problem on the backup gateway. For more information, see FAQ.
- If you back up an entire database, the permission data and stored procedures are also backed up.
- In the Configure Backup Time step, set the parameters that are described in the following table and click Next in the lower-right corner of the page.
Parameter Description Full-scale Backup Frequency The frequency of the backup schedule. Valid values: Periodic Backup and Single Backup.Note If you select Periodic Backup, you must set the Full Data Backup Recurrence, Start At, and incremental backup-related parameters. Full Data Backup Recurrence The days of the week on which DBS runs the backup schedule. Start At The start time of the backup.Note If a previous full backup is not finished at the start time of the next full backup, DBS skips the next full backup. Incremental Backup Specifies whether to enable incremental backup. After incremental backup is enabled, DBS performs regular incremental backup operations based on the value of the Transaction Log backup interval parameter.
This parameter is displayed only when you set the Full-scale Backup Frequency parameter to Periodic Backup.
Transaction Log backup interval The interval at which incremental backups are performed. If you set the interval to 10 minutes, DBS performs an incremental backup every 10 minutes. Does not automatically delete backed up incremental Specifies whether to automatically delete the archived redo log files that are backed up. Valid values:
Note If you want to change the default time period after which the archived redo log files are automatically deleted, submit a ticket. For example, you can change the default time period from seven days to 14 days.
- Enable: The archived redo log files that are backed up are not automatically deleted.
- Disable: DBS automatically deletes the archived redo log files that are backed up. By default, the archived redo log files that were backed up seven days ago are deleted.
Enable compression Specifies whether to enable compression during backup. Valid values:
- Enable: recommended. Data is compressed during backup to reduce storage space.
- Disable: Data is not compressed during backup.
- In the Edit Lifecycle step, configure the lifecycle for a full backup set in the Configure Full Data Backup
Lifecycle section. If you set the Incremental Backup parameter to Enable in the previous step, you must also configure the lifecycle for an incremental backup set. For more information about the lifecycle of backup sets, see How do I manage the lifecycle rules of backup sets?
- After the configurations are complete, click Precheck in the lower-right corner of the page.
- If the Precheck Passed message appears, click Start Task. Note When the status of the backup schedule changes to Running, the backup schedule takes effect. You can view the backup task on the Backup Schedules page. For more information, see View backup schedules.
What to do next
Q: The backup gateway is installed. Why is the Available section empty when I configure a backup schedule?
- SQL statements
ALTER SERVER ROLE [sysadmin] ADD MEMBER [NT AUTHORITY\SYSTEM] GO