All Products
Search
Document Center

Cloud Backup:Register an on-premises SQL Server database

Last Updated:Sep 22, 2023

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 virtual private clouds (VPCs) by using virtual private networks (VPNs) or Express Connect circuits. 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.

  3. In the top navigation bar, select a region.

  4. On the Database Backup page, click SQL Server.

  5. On the Local Database Instance tab, click Register Database Instance in the upper-right corner.

  6. In the Add Client panel, install the client as prompted.

    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:

      command
      ./client.exe init local-uni --uniUserInfoToken "eyJ1cmwiOiJodHRwczovL2EtaGJyLXJlc291cmNlLXNoYW5naGFpLm9zcy1jbi1zaGFuZ2hhaS1pbnRlcm5hbC5hbGl5dW5jcy5jb20vY2xpZW50L2luc3RhbGwvZGJhY2t1cF9hZ2VudC93aW42NC84LjAuMjkyOTItMS4wMjg1Nzc2LmRiZy8iLCJob3N0IjoiMTAwLjEwMy44My43OSIsInBvcnQiOjYwMzA1LCJteXNxbEFnZW50IjoiTm8iLCJtc3NxbEFnZW50IjoiWWVzIiwib3JhY2xlQWdlbnQiOiJObyIsInZlcnNpb24iOiI4LjAuMjkyOTItMS4wMjg1Nzc2LmRiZyIsImFjY2Vzc0tleSI6IjY0OTg0MmY2ZjM0OTc2ZGIxZDUwMWNlNmE1OGQ2MmUyIiwidXNlU3NsIjoiWWVzIiwidXNlclRva2VuIjoiMDZOVEtCN1ciLCJyZWdpb25JZCI6ImNuLXNoYW5naGFpIiwic291cmNlVHlwZSI6Ik1TU1FMIn0="

      After you run the command, the command output shows the installation log. installedIf Install agent successful is displayed in the log, the Cloud Backup client is installed.installed2

    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. You can also upgrade an Cloud Backup client based on your business requirements. console

  7. If the on-premises database is in the Not Activated state, you need to 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.

      activate instance

    After the SQL Server database is registered, the status of the database changes to Online on the Local Database Instance tab.

What to do next

To delete a registered database, perform the following steps:

  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.

What to do next

Back up an SQL Server database