You can use Hybrid Backup Recovery (HBR) 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.

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 HBR. For more information, see Overview
  • 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 HBR console to back up the instance. To create a backup plan, perform the following steps:

  1. Log on to the HBR console.
  2. In the left-side navigation pane, choose Backup > Database Backup.
  3. In the top navigation bar, select a region.
  4. On the Database Backup page, click the SQL Server tab.
  5. Click the ECS Database Instance or Local Database Instance tab.
  6. 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.
  7. In the Create Backup Plan panel, perform the following steps:
    1. Set the backup parameters and click Next.
      1. Specify Plan Name.
      2. Select the SQL server instance that you need to back up.
    2. 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.

      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.

    3. 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 when files are being backed up.
      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.
    4. Select a backup vault and click OK.
      Notice You 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 vault in the Vault Name field. If you do not configure this parameter, a random name is specified for the backup vault.
      • Select Vault: If you select this option, select a backup vault from the Vault Name drop-down list.
      Notice After 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.
      Vault Name The name of the backup vault.
      Data Redundancy Type This parameter is required only if the Backup Vault parameter is set to Create Vault. This parameter specifies the type of data redundancy for the backup vault. The data redundancy mechanism improves data reliability of the backup vault.
      • Locally redundant storage

        If LRS is enabled, HBR stores the copies of each object on multiple devices of different facilities in the same zone. This way, HBR ensures data durability and availability even if hardware failures occur.

      • Zone-redundant storage

        If ZRS is enabled, HBR uses the multi-zone mechanism to distribute data across three zones within the same region. If a zone becomes unavailable, the data can still be accessed.

      For more information, see Storage vault types.

      Retention Period The retention period of the backup data. Unit: days, weeks, months, or years.

      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.

What to do next

On the Backup Plan tab, find the backup schedule. In the Actions column, you can click buttons to perform the following operations:

  • Modify a backup schedule

    If a backup schedule does not meet your requirements, you can click Edit to modify the backup schedule.

  • Configure alerts

    You can choose More > Alert Settings 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 schedule

    If you delete a backup schedule, all backup and restoration jobs that are being performed based on the backup schedule are interrupted.

    To delete a backup schedule, find the backup schedule and choose More > Delete Backup in the Actions column.

What to do next

Restore an SQL Server database