Updated on 2024-01-02 GMT+08:00

Exporting Backup Files

This section describes how to export the full backup files and incremental backup files of a database.

  1. Check the parameter settings of the local database.

    This operation is mandatory for full and incremental migration. If you only perform the full migration, skip this step.

    The database has log truncation and shrinking configurations. Therefore, before exporting full backup files, you must set the database recovery model to Full until the entire database and services are migrated to the DB instance on the current cloud.

    1. Log in to the local database center through Microsoft SQL Server Management Studio.
    2. Right-click the database to be migrated and choose Properties from the shortcut menu. In the displayed dialog box, select Options from the left list.
    3. Select Full for Recovery model. Then, click OK.
      Figure 1 Configuring the recovery model

  2. (Optional) Set backup file compression parameter.

    If the bandwidth of your local data center is low and uploading data to OBS Browser takes a long time, you are advised to configure the backup file compression parameters.

    1. Log in to the database center through Microsoft SQL Server Management Studio as the database administrator.
    2. In Object Explorer, right-click the server and choose Properties.
    3. Click Database Settings.
    4. In the Backup and restore area, select Compress backup.
      This setting determines the server-level default setting for compression backup, as detailed below:
      • If Compress backup is not selected, the new backup will not be compressed by default.
      • If Compress backup is selected, the new backup file is compressed by default.
        Figure 2 Configuring compression parameter

  3. Export the full backup file.

    1. Log in to the local database center through Microsoft SQL Server Management Studio.
    2. Right-click the database whose data needs to be exported and choose Tasks > Back Up.
      Figure 3 Back Up
    3. Set Backup type to Full, click Add, and enter the path to which the backup file is exported. The file name extension must be .bak.
      Figure 4 Setting the full backup file
    • It is recommended that the backup file name be the same as the database name (case sensitive), and the suffix .bak be added to the backup file name.
    • You are advised to back up all the databases in a .bak file or a few .bak files. This reduces the frequency of uploading and restoring the database.

  4. Export the incremental backup file.

    1. Log in to the local database center through Microsoft SQL Server Management Studio.
    2. Right-click the database whose data needs to be exported and choose Tasks > Back Up.
      Figure 5 Back Up
    3. Select Transaction Log for Backup type, click Add, and enter the path to which the backup file is exported. The suffix is .bak.
      Figure 6 Setting the incremental backup file
    • It is recommended that the backup file name be the same as the database name (case sensitive), with the time stamp and .bak suffix. For example: [Database name] _Incr_ [Timestamp] .bak.
    • You are advised to back up all the databases in a .bak file or a few .bak files. This reduces the frequency of uploading and restoring the database. For example, you can back up the A, B, and C databases to a .bak file, and then compress, upload, and restore the three databases in a batch. This helps to improve the success rate of data restoration.