You can use Hybrid Backup Recovery (HBR) to back up SQL Server databases deployed on Alibaba Cloud Elastic Compute Service (ECS) instances and restore these databases as required. This topic describes how to back up SQL Server databases.

Prerequisites

Preparations are completed.

Background

Before you back up SQL Server databases, note the following points:

  • Make sure that .NET Framework 4.5 or later is installed.
  • HBR supports the following SQL Server versions: SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, and SQL Server 2017. For more information, see Limits.
  • SQL Server databases cannot be installed in a file system where compression is enabled. For more information about limits on SQL Server installation, see File Locations for Default and Named Instances of SQL Server.

Create a backup plan

To create a backup plan, follow these steps:

  1. Log on to the HBR console.
  2. In the left-side navigation pane, choose Backup > ECS Application Backup. On the ECS Application Backup page, select SQL Server.
  3. On the page that appears, click the SQL Server Instance tab. On the SQL Server Instance tab, find the target SQL Server instance and click Backup in the Actions column.
  4. In the Create Plan pane that appears, select the databases to be backed up.
    • If you have added the databases to be backed up to a database group, set Select Backup Source to Database Group and select the database group.
    • If you have not added the databases to be backed up to a database group, set Select Backup Source to Select Database. Select the databases to be backed up and set Group Name to create a database group. For more information, see Step 3: Create a database group to be backed up.
    • If you want to back up all databases, set Select Backup Source to All Database and set Include system database.
  5. Click Next. In the Config Backup Plan step, set the parameters as described in the following table.
    Parameter Description
    Backup Type
    • Complete: backs up full data in the database.
    • Differential: backs up data modified after the last full backup.
      Note
      • Before you start the first differential backup for a database, you must perform a full backup.
      • After you restore a database, to perform a differential backup for the database, you must perform a full backup first.
    • Log: backs up logs for the database.
      Note
      • Before you back up logs for a database for the first time, you must perform a full backup.
      • After you restore a database, to back up logs for the database, you must perform a full backup first.
    Plan Name The name of the backup plan.
    Start Time The start time of the backup plan. The time is accurate to seconds.
    Plan Run Interval The interval for backing up data. Valid units: hours, days, and weeks.
    Backup Retention Policy The retention policy of backup data. Valid values: Specify Retention Time and Forever.

    If you select Specify Retention Time, you can specify a retention period in the range of 1 day to 999 years for backup data.

    Note The retention period of incremental backup data is the same as that of full backup data and cannot be changed.
  6. Click OK.
    Note To change the retention period of backup data, repeat the preceding steps and specify another retention period.

What to do next

After a backup plan is created, you can view and manage the backup plan, cancel backup jobs, and view the records of database backups and log backups.

  • View and manage a backup plan

    In the HBR console, you can view the information and status of created backup plans, and manage these backup plans. To view and manage a backup plan, follow these steps:

    1. In the left-side navigation pane, choose Backup > ECS Application Backup. On the ECS Application Backup page, select SQL Server.
    2. On the page that appears, click the Backup Plan tab.
    3. On the Backup Plan tab, find the target backup plan and check its information and status.
    4. Click a button in the Actions column as needed to manage the backup plan. In the Actions column, you can click Edit, Execute, Disable Plan, Enable Plan, or Delete Plan. After you delete a backup plan, HBR no longer runs the plan but retains data that is backed up by using the plan.
  • View or cancel a backup job

    In the HBR console, you can view the status of backup jobs or cancel ongoing backup jobs. To view or cancel a backup job, follow these steps:

    1. In the left-side navigation pane, choose Backup > ECS Application Backup. On the ECS Application Backup page, select SQL Server.
    2. On the page that appears, click the Backup Jobs tab.
    3. On the Backup Jobs tab, find the target backup job and check its information and status.
    4. To cancel an ongoing backup job, find the target job and click Cancel in the Actions column.
  • View the records of database backups and log backups

    You can view all backup records in the HBR console. To view backup records, follow these steps:

    1. In the left-side navigation pane, choose Backup > ECS Application Backup. On the ECS Application Backup page, select SQL Server.
    2. On the page that appears, click the SQL Server Instance tab.
    3. On the SQL Server Instance tab, find the target SQL Server instance. Click the instance name or ID, or choose More > View Details in the Actions column.
    4. On the SQL Server Instance page, click the Data Backups tab to view database backup records, or the Log Backups tab to view log backup records.