You can use Hybrid Backup Recovery (HBR) to back up on-premises SQL Server databases. This topic describes the preparations that you must make before backup.

Background information

Before you use HBR to back up on-premises SQL Server databases, note the following information:

  • You can use the on-premises SQL Server backup service in the following regions: China (Beijing), China (Shanghai), China (Shenzhen), China (Hangzhou), China (Qingdao), China (Zhangjiakou-Beijing Winter Olympics), China (Hohhot), China (Hong Kong), Singapore (Singapore), US (Silicon Valley), Indonesia (Jakarta), Malaysia (Kuala Lumpur), Australia (Sydney), Germany (Frankfurt), and Japan (Tokyo). This service will be available in more regions soon.
  • The version of .NET Framework must be 4.5 or later.
  • The SQL Server version must be SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, and SQL Server 2017. For more information, see Limits.
  • You can also back up SQL Server databases that are hosted on Elastic Compute Service (ECS). For more information, see Back up SQL Server databases that are hosted on ECS.
  • SQL Server files cannot be stored on file systems for which compression is enabled. For more information about the SQL Server installation limits, see File Locations for Default and Named Instances of SQL Server.

(Recommended) Prepare an AccessKey pair for a RAM user

Resource Access Management (RAM) is a service provided by Alibaba Cloud. It allows you to create and manage multiple identities under an Alibaba Cloud account and then grant diverse permissions to a single identity or a group of identities. In this way, you can authorize different identities to access different Alibaba Cloud resources.

An AccessKey pair is required when you activate a backup client. The AccessKey pair is an identity credential. If an AccessKey pair of your Alibaba Cloud account is used, all cloud resources that belong to the account are exposed to risks. Therefore, we recommend that you use an AccessKey pair of a RAM user to activate backup clients. Before you back up data, make sure that a RAM user is created and an AccessKey pair is created for the RAM user. For more information, see Create a RAM user and Create an AccessKey pair for a RAM user.

Step 1: Register an SQL Server instance

Before you back up SQL Server databases, you must register an SQL Server instance. After the SQL Server instance is registered, you can download and install a backup client for files on each node of the SQL Server instance. The backup client is used for backup and restoration. To register an SQL Server instance, perform the following steps:

  1. Log on to the HBR console.
  2. In the top navigation bar, select the region where you want to store the backup data.
  3. In the left-side navigation pane, choose Backup > On-Premises Backup. On the On-Premises Backup page, click SQL Server.
  4. In the upper-right corner of the SQL Server Instances tab, click Register SQL Server Instance.
  5. In the Register SQL Server Instance pane, perform the following steps to register an SQL Server instance:
    • Configure the SQL Server instance.
      1. In the Configure Instance step, set the following parameters.
        Parameter Description
        Backup Vault The backup vault where you want to store the backup data. A backup vault is a repository that HBR uses to store backup data. You can use a single vault to store backup data that is received from multiple backup clients. Backup vaults reside in different regions. You can select or create only a backup vault in the current region.
        • If you have created backup vaults, click Select Vault, and select a backup vault from the Vault Name drop-down list.
        • If you have not created backup vaults, click Create Vault and specify the Vault Name field. The vault name must be 1 to 64 characters in length.
        Server Name The server name and instance name of the SQL Server, in the format of <Server name>\<Instance name>, for example, localhost\MSSQLSERVER. If you need to specify the default instance, you do not need to specify the instance name.
        Authentication The authentication method that is used to connect to the SQL Server instance.
        • If you select Windows Authentication, enter the name of a Windows user in the Windows Username field. The username is used to log on to the Windows system where the SQL Server instance.
        • If you select SQL Server Authentication, specify the name of an SQL Server database user in the Database Account field. The username is used to log on to the SQL Server instance.
        Password The password of the user.
      2. Click Next.
    • Add a backup client.
      1. In the Add Client step, set the following parameters.
        Table 1. Add a client
        Parameter Description
        Backup Client
        • Create Client: Select this option if no backup client for files is installed and activated on the server from which you want to back up data.
        • Select Client: Select this option if a backup client for files has been installed and activated on the server from which you want to back up data. Then, select the backup client that has been activated.
        Client Name The name of the backup client. The name must be 1 to 64 characters in length.
        Software Platform The operating system that is running on the server from which you want to back up data. Valid values:
        • Window 32-bit
        • Window 64-bit
        Network Type
        • Virtual Private Cloud (VPC): Select this option if the server from which you want to back up data resides in a VPC and the VPC is in the same region as the backup vault.
        • Classic Network: Select this option if no VPCs are available.
        Use HTTPS Specifies whether to use HTTPS for encrypted data transmission. Note that HTTPS compromises the performance of data transmission. Data that is stored in the backup vault is encrypted, regardless of the setting of this switch. If you modify the setting of this parameter, the modification takes effect on the next backup or restore job.
      2. Click Create. The Download Client button appears.
    • Download and install the backup client.
      1. Click Download Client.
      2. Save the downloaded installation package of the backup client for files.
      3. Log on to the server where SQL Server is installed and install the backup client.
        Note Make sure that enough space is available in the installation directory because both operational logs and an executable file are saved in the installation directory.
    • Activate the backup client.
      1. After the client is installed, you must activate the client. In the Register SQL Server Instance pane of the HBR console, click Next. In the Activate Client step, set the following parameters.
        Parameter Description
        Client IP Address The IP address of the server or virtual machine (VM) where the backup client for files is installed.
        Note The IP address must be reachable from your browser in use.
        AccessKey Id The AccessKey ID and AccessKey secret of the RAM user that is used to access HBR. For more information, see Create an AccessKey for a RAM user.
        AccessKey Secret
        Client Password The password of the backup client. The password must be at least six characters in length.
      2. Click Activate Client.
        • After the backup client for files is installed and activated, you can view the installation status of the client on the node of the SQL Server instance. To delete the backup client from the node, find the client in the HBR console and click Delete in the Actions column.
        • After the SQL Server instance is registered, you can view the information and status of the SQL Server instance on the SQL Server Instances tab of the On-Premises Backup page. To modify the connection information of the SQL Server instance, find the SQL Server instance and choose More > Modify Instance in the Actions column.

Step 2: Add a client for a new node

If a node is added to the SQL Server cluster after the SQL Server instance is registered, you can add a file backup client for the new node. To add a backup client for files, perform the following steps:

Note You can add only one backup client for each SQL Server instance.
  1. On the SQL Server Instances tab, find the SQL Server instance. Click the instance ID, or choose More > View Details in the Actions column.
  2. On the SQL Server Instances page, click the Backup Client tab. In the upper-right corner, click Add Client.
  3. In the Add Client pane, set the parameters and click Create. The Download Client button appears. For more information about the parameters, see the table in Add a client.
  4. Download the installation package of a backup client for files to the node. Otherwise, copy the downloaded installation package to the node. Then, install the backup client.
  5. Log on to the HBR console and find the backup client. Choose More > Activate Client in the Actions column. In the pane that appears, set the parameters. For more information about the parameters, see the table in Activate the client.
  6. Click Activate Client to activate the backup client on the new node.

Step 3: Create a database group

Before you back up data, you must group databases by backup plan. To create a database group, perform the following steps:

Note If you need to back up a database separately, create a group exclusively for the database.
  1. Log on to the HBR console.
  2. In the left-side navigation pane, choose Backup > On-Premises Backup. On the On-Premises Backup page, click SQL Server.
  3. Click the Database Groups tab. In the upper-right corner of the Database Groups tab, click Create Group.
  4. In the Create Group pane, set the Group Name and Description parameters. Then, select one or more databases and add them to the group.
  5. Click OK.

(Recommended) Limit the memory usage for an SQL Server instance

By default, SQL Server instances occupy as much system memory as possible. This may affect backup. Therefore, we recommend that you perform the following steps to limit the memory usage of an SQL Server instance:

  1. Start SQL Server Management Studio and connect to the SQL Server instance.
  2. Right-click the instance name and select Properties.
  3. In the dialog box that appears, click Memory in the left-side navigation pane. On the Memory tab, set Maximum server memory.
    Note We recommend that you reserve at least 2 GB memory for backup and other system services. For example, if the system memory is 16 GB, the recommended value of Maximum server memory is 14336 for the SQL Server instance.