All Products
Search
Document Center

Cloud Backup:Register an on-premises SQL Server database

更新時間:Dec 19, 2024

Before you use Cloud Backup to back up an SQL Server database deployed on an on-premises server, you must register the SQL Server database in the Cloud Backup console.

Prerequisites

  • The preparations for database backup are completed. For more information, see Before you begin.

  • The on-premises database server is connected to a virtual private cloud (VPC) by using a virtual private network (VPN) gateway or Express Connect circuit. One of the following CIDR blocks can be used for communication between the on-premises database server and Alibaba Cloud: 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.

Procedure

  1. Log on to the Cloud Backup console.

  2. In the left-side navigation pane, choose Backup > Database Backup. In the top navigation bar, select a region. On the Database Backup page, click the SQL Server tab. On the Local Database Instance tab, click Register Database Instance.

    image

  3. In the Add Client panel, install a Cloud Backup client as prompted.

    Automatically install the Cloud Backup client for database backup

    1. Download and decompress the Cloud Backup client for Windows.

      Note

      To download the Cloud Backup client to your on-premises server, you can right-click the URL to copy the URL, and then open the URL in a browser on the on-premises server.

    2. Log on to the on-premises server. Then, use PowerShell to run the following command in the decompressed directory to activate the Cloud Backup client for Windows.

      You can obtain the following sample command from the Cloud Backup console:

      执行命令

      .\client.exe init local-uni --uniUserInfoToken "eyJ1cmwiOiJodHRwczovL2EtaGJyLXJlc291cmNlLXNoYW5naGFpLm9zcy1jbi1zaGFuZ2hhaS1pbnRlcm5hbC5hbGl5dW5jcy5jb20vY2xpZW50L2luc3RhbGwvZGJhY2t1cF9hZ2VudC93aW42NC84LjAuMjkyOTItMS4wMjg1Nzc2LmRiZy8iLCJob3N0IjoiMTAwLjEwMy44My43OSIsInBvcnQiOjYwMzA1LCJteXNxbEFnZW50IjoiTm8iLCJtc3NxbEFnZW50IjoiWWVzIiwib3JhY2xlQWdlbnQiOiJObyIsInZlcnNpb24iOiI4LjAuMjkyOTItMS4wMjg1Nzc2LmRiZyIsImFjY2Vzc0tleSI6IjY0OTg0MmY2ZjM0OTc2ZGIxZDUwMWNlNmE1OGQ2MmUyIiwidXNlU3NsIjoiWWVzIiwidXNlclRva2VuIjoiMDZOVEtCN1ciLCJyZWdpb25JZCI6ImNuLXNoYW5naGFpIiwic291cmNlVHlwZSI6Ik1TU1FMIn0="

      After you run the command, the command output shows the installation log. 执行命令If Install agent successful is displayed in the log, the Cloud Backup client is installed. For more information about how to resolve installation errors, see FAQ.安装成功

      After you register the SQL Server database, Cloud Backup installs a client on each node of the SQL Server database. On the Local Database Instance tab, you can view the installation status of the Cloud Backup client on each node of the SQL Server database. After the Cloud Backup client is installed, you can upgrade the client based on your business requirements.控制台

    3. If the on-premises database is in the Not Activated state, you must activate the database.

      1. Find the database and click Config in the Actions column.

      2. In the Activate Instance dialog box, enter the username and password of the database and click OK.

        image

If the automatic installation of the Cloud Backup client for Windows fails, perform the following steps to manually install the Cloud Backup client.

Manually install the Cloud Backup client for database backup

  1. Download and decompress the Cloud Backup client for Windows.

  2. Double-click dbackupxxxxx.exe and click Next.

    image

    Select File and Microsoft SQL Server and click Next.

    Copy the values of the Backup Server IP Address, Backup Server Port, and Access Key parameters from the Cloud Backup console to the corresponding fields in the installation step, and select Secure Sockets Layer (SSL) encryption. Click Next until the installation is complete.

    image

  3. When the installation is complete, use PowerShell to run the command obtained from the Cloud Backup console in the decompressed directory.

    image

    If the content of the red box in the following figure appears, the Cloud Backup client is installed.

    image

  4. Go back to the Cloud Backup console and activate the on-premises database.

    1. Choose More > Reactivate in the Actions column of the database.

    2. In the Activate Instance dialog box, enter your database username and password, and click OK.

      image

After you register and activate the on-premises database, you can check that Status of the SQL Server database is Online on the Local Database Instance tab.

Delete a registered database

  1. Log on to the on-premises server and run the following command to uninstall the Cloud Backup client for Windows:

    1. Go to the installation directory of the Cloud Backup client by using PowerShell, for example, C:\Program Files\aliyun\unibackup>.

    2. Run the following command:

       .\uninstall-unibackup.exe /S /NCRC
  2. On the Local Database Instance tab, find the database that you want to unregister, and choose More > Unregister Instance in the Actions column.

    Warning

    After you unregister a database, all backups generated by the Cloud Backup client for Windows cannot be restored. Proceed with caution.

  3. In the dialog box that appears, click OK.

FAQ

What do I do if the following error message is returned when I install a Cloud Backup client to back up an on-premises SQL Server database: Failed to run install script:exit status 4?

What to do next

Back up an SQL Server database