Help Center> GaussDB(for MySQL)> User Guide> Data Restorations> Restoring Instance Data to a Specific Point in Time
Updated on 2024-05-21 GMT+08:00

Restoring Instance Data to a Specific Point in Time

Scenarios

You can restore data of an instance to a specified point in time.

Constraints

  • Keep your account balance above zero so that backup data can be restored to a new DB instance. You will be billed for new instance specifications.
  • Do not run the reset master command on instances within their lifecycle. Otherwise, an exception may occur during the point-in-time restore.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page, choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name to go to the Basic Information page.
  5. In the navigation pane on the left, choose Backups. On the displayed page, click Restore to Point in Time.
  6. Select a time range, select or enter a time point within the acceptable range, and set Restoration Method to Create New Instance, Restore to Original, or Restore to Existing.

    If you have enabled operation protection, click Start Verification in the Restore DB Instance dialog box. On the displayed page, click Send Code, enter the obtained verification code, and click Verify. The page is closed automatically.

    For details about how to enable operation protection, see Identity and Access Management User Guide.

    Figure 1 Restoring to a point in time
    1. Select Create New Instance and click OK. On the Create New Instance page, configure parameters and click Next.
      • The region, DB engine and version of the new instance are the same as those of the original instance and cannot be changed.
      • The default database port is 3306.
      • To synchronize database parameters of the original DB instance, select Original DB instance parameter template.
        • If the original DB instance is deleted, the database parameters of the original DB instance cannot be synchronized using backups.
        • When you synchronize the database parameters of the original DB instance, the following parameters cannot be synchronized and you need to manually modify them after the DB instance is restored.
          • innodb_write_io_threads
          • innodb_read_io_threads
          • max_connections
          • innodb_log_buffer_size
          • innodb_parallel_read_threads
          • temptable_max_ram
          • threadpool_size
          • innodb_buffer_pool_size
          • innodb_page_cleaners

      • Other settings are the same as those of the original instance by default and can be modified. For details, see Buying a DB Instance.
    2. Select Restore to Original and click Next.

      Data on the original instance will be overwritten and the original DB instance will be unavailable during the restoration.

      Figure 2 Restoring to the original DB instance
    3. Select Restore to Existing, select the target DB instance, and click Next.
      • Restoring data to an existing DB instance will overwrite data and password of user root on it and cause the existing DB instance to be unavailable during the restoration. DB instances will not be displayed unless they have the same DB engine type, version, and table name case sensitivity as the original DB instance.
      • The restored DB instance contains the data and account information of the original DB instance, but does not contain the parameter settings of the original DB instance.
      • If the original password of the existing DB instance cannot be used to connect to the database after the restoration, you can reset the password.
      Figure 3 Restoring to an existing instance

  7. View the restoration results.

    • Create New Instance: After the creation is complete, the instance status changes from Creating to Available. The new instance is independent from the original one and includes the data before the backup was created. If you want to offload read pressure from the primary node, create one or more read replicas for the new instance.

      A full backup is triggered after the new instance is created.

    • Restore to Original and Restore to Existing: When the instance status changes from Restoring to Available, the restoration is complete.