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
Log on to the Cloud Backup console.
In the left-side navigation pane, choose .
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.
In the Add Client panel, install a Cloud Backup client as prompted.
Automatically install the Cloud Backup client for database backup
Download and decompress the Cloud Backup client for Windows.
NoteTo 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.
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.
If the on-premises database is in the Not Activated state, you must activate the database.
Find the database and click Config in the Actions column.
In the Activate Instance dialog box, enter the username and password of the database and click OK.
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
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
Log on to the on-premises server and run the following command to uninstall the Cloud Backup client for Windows:
Go to the installation directory of the Cloud Backup client by using PowerShell, for example,
C:\Program Files\aliyun\unibackup>
.Run the following command:
.\uninstall-unibackup.exe /S /NCRC
On the Local Database Instance tab, find the database that you want to unregister, and choose
in the Actions column.WarningAfter you unregister a database, all backups generated by the Cloud Backup client for Windows cannot be restored. Proceed with caution.
In the dialog box that appears, click OK.