Restoring a Backup File to a GaussDB Instance
Scenarios
You can use an instance-level automated or manual backup to restore data to the point in time when the backup was created. The restoration is at the DB instance level.
Data can be restored to a new DB instance, an existing DB instance, or the original DB instance.
Precautions
- Restoration will fail if the instance is in the Abnormal, or Storage full state.
- GaussDB currently only supports restoration between DB instances running the same major version. For example, backup data can only be restored from version V2.0-1.4.x to version V2.0-1.4.y.
- If parallel restoration is enabled, all primary and standby replicas will simultaneously download backup data from the storage server. Compared to serial restoration, this process demands a multiple of the bandwidth from the storage server equal to the number of replicas in each shard. If your instance has more than five shards, consult O&M personnel about the available bandwidth of the OBS server before deciding whether to enable parallel restoration. This will prevent a decrease in restoration speed due to bandwidth exhaustion.
- Centralized instances support only parallel restoration.
- Parallel restoration cannot be enabled if the DB engine version is earlier than V2.0-1.4.
- In addition to full backups and incremental backups, the system backs up incremental log files to ensure data consistency. It takes some time to back up and upload incremental log files (The time depends on the network and OBS traffic control). Note that the backup completion time does not represent the data consistency point that can be specified when this backup set is used to restore data. (Generally, the data consistency point is within several minutes before the backup completion time.) If you have strict requirements on data consistency after restoration, restore data to a specified point in time.
Restoring an Instance Using a Backup File
- Log in to the management console.
- Click  in the upper left corner and select a region and project. in the upper left corner and select a region and project.
- Click  in the upper left corner of the page and choose . in the upper left corner of the page and choose .
- In the navigation pane, choose Backups. On the Backups page, locate the backup to be restored and click Restore in the Operation column.
      
      Alternatively, click the name of the target instance on the Instances page. In the navigation pane, choose Backups. On the Full Backups page, click the Instance Backup tab, and click Restore in the Operation column of the backup to be used for restoration. 
- Set Restoration Method to Create New Instance and click OK.
      
      
      
      - The new DB instance must have the same major version as the original instance when it was backed up. For example, backup data can only be restored from version V2.0-1.4.x to version V2.0-1.4.y.
- The storage space of the new instance is the same as that of the original DB instance by default and the new instance must be at least as large as the original DB instance. The storage space for a single shard starts from 40 GB and can be increased at a step of 4 GB.
- The administrator password needs to be reset.
- By default, the instance specifications of the new instance are the same as those of the original instance. To change the instance specifications, ensure that the instance specifications of the new instance are at least those of the original instance.
- The backup media, CPU architecture, OS type and version, instance type (distributed or centralized), deployment model, replica consistency protocol, and transaction consistency settings of the new instance must be the same as those of the original instance to be restored.
- If there are M-compatible databases in the instance to be restored, the Table Names in M-compatible Databases parameter of the new instance must be set to the same value as that of the original instance. The default value is Case-sensitive.
 
- On the displayed page, configure parameters of the new instance and click Next.
      
      Table 1 Parameters in the Basic Settings area Parameter Description Billing Mode GaussDB provides yearly/monthly billing and pay-per-use billing. - Yearly/Monthly: You pay upfront for the amount of time you expect to use the DB instance for. You will need to make sure you have a top-up account with a sufficient balance or have a valid payment method configured first. 
             For distributed instances using the combined deployment model, yearly/monthly billing is only available to authorized users. To apply for the permissions needed, submit a service ticket. 
- Pay-per-use: You can start using the DB instance first and then pay as you go. Pricing is listed on a per-hour basis, but bills are calculated based on the actual usage duration.
 Region A region where the tenant is located. You can change the region on the instance creation page, or go back to the Instances page and change it in the upper left corner. Products in different regions cannot communicate with each other over a private network. After the instance is created, you cannot change its region. Table 2 Parameters in the Instance Configuration area Parameter Description DB Instance Name The instance name is case-sensitive, must start with a letter, and can contain 4 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. Edition Type GaussDB provides Basic edition and Enterprise edition. The basic edition lacks certain advanced features that are available in the enterprise edition. The basic edition delivers the same level of performance as the enterprise edition at a more affordable price. This edition is ideal for users who prioritize cost and do not need advanced features. For more details about the differences between the two editions, see Differences Between the Basic and Enterprise Editions of GaussDB Instances. DB Engine Version Select the GaussDB database version of the new instance. NOTE:- Instances of V2.0-8.102 or later run on Huawei Cloud EulerOS.
- A DR relationship cannot be established between instances running on Huawei Cloud EulerOS and those running on EulerOS.
 DB Instance Type - Distributed: Distributed instances allow you to add nodes as needed to handle large volumes of concurrent requests.
- Centralized: Centralized instances are good for small stable volumes of data, where data reliability and service availability are important.
 Deployment Model - Distributed 
             - Independent: Database components are deployed on different nodes. This model is suitable for where high availability and stability are required and the instance scale is large.
- Combined: Different database components are deployed on the same node. This model is only available for basic edition instances of V2.0-3.223 or later. Storage autoscaling is not supported by this model.
 
- Centralized 
             - HA (1 primary + 2 standby): 3-node deployment where there is one shard. The shard contains one primary DN and two standby DNs.
- Single: single-node deployment where there is only one CMS component and one DN. This model is only available for instances of V2.0-2.2 or later. This single-node deployment cannot guarantee service availability (SLA) and is not suitable for production environments. It is only recommended for R&D and testing purposes.
- 1 primary + 1 standby + 1 log: 3-node deployment where there is one shard with three replicas. The shard contains one primary DN, one standby DN, and one log-dedicated DN. This model is only available for instances of V2.0-3.200 or later. This option is available only when Resource Type is set to Elastic Cloud Server (ECS).
 
 CAUTION:- Single: The availability (or SLA) cannot be guaranteed because the instance is deployed on a single server.
 Log Nodes Supported This parameter is only available for distributed instances. If this option is selected, the distributed instance will be created using the 1 primary + 1 standby + 1 log deployment model. By default, centralized instances support the 1 primary + 1 standby + 1 log deployment model. You can simply set Deployment Model to 1 primary + 1 standby + 1 log as needed when creating a centralized instance. Transaction Consistency This parameter is available only to distributed instances. - Strong consistency: When an application updates data, every user can query all data that has been successfully committed, but performance is affected.
- Eventual consistency: When an application updates data, the data users queried may be different, and some users may not obtain the most current value. The most current data may take a bit of time to become available for query by all users. However, DB instances with eventual consistency generally have higher performance. Eventual consistency cannot ensure strong read consistency of distributed transactions and consistency of transactions that depend on query results, such as INSERT INTO SELECT * FROM. Write operations that are split into multiple statements or involve in multiple nodes are not supported. DR relationships cannot be created.
 Failover Priority This parameter is only available for distributed instances in the independent deployment model. This parameter is only available for authorized users. To apply for the permissions needed, submit a service ticket. The default value is Reliability. For details about how to change the failover priority for an existing instance, see Changing the Failover Priority. - Reliability: Data consistency is prioritized during a failover. This is recommended for applications whose highest priority is data consistency.
- Availability: Database availability is given priority during a failover. This is recommended for applications that require their databases to provide uninterrupted online services. 
             If Availability is selected, exercise caution when modifying the following database parameters. For details about how to modify parameters, see Modifying Instance Parameters.- recovery_time_target: If the value of this parameter is changed, the instance will experience frequent forced failovers. Contact technical support before modifying this parameter.
- audit_system_object: If the value of this parameter is changed, DDL audit logs will be lost. Contact technical support before modifying this parameter.
 
 Replicas This parameter is only available for distributed instances. Total number of DNs each shard, primary and standby DNs combined. There are three replicas in a shard, indicating that there are one primary and two standby DNs in a shard. Shards This parameter is available only for distributed instances. It specifies the number of shards in an instance. A shard contains multiple DNs. The number of DNs in a shard depends on the value of Replicas, for example, if Replicas is set to 3, there are three DNs (one primary and two standby DNs) in a shard. The value ranges from 1 to 128. You can add up to 256 shards for an existing instance. For details, see Adding Shards for an Instance. Coordinator Nodes This parameter is available only for distributed instances. It indicates the number of CNs in an instance. The value ranges from 1 to 128. You can add up to 256 CNs for an existing instance. For details, see Adding Coordinator Nodes for an Instance. It is recommended that at least two CNs be configured for an instance. Configuring only one CN results in low service reliability, making it best suited for test environments rather than production use. A CN provides the following functions: - It receives access requests from applications and returns execution results to clients.
- It breaks down tasks and distributes task fragments to different DNs for parallel processing.
 AZ An AZ is a physical region where resources have independent power supply and networks. AZs are physically isolated but interconnected through an internal network. Select either one or three AZs. Three AZs are recommended. To deploy a GaussDB instance in Intelligent EdgeCloud (IEC), select an IEC HomeZones for AZ. For assistance with this setup, submit a service ticket to contact Huawei engineers. Table 3 Parameters in the Resource Configuration area Parameter Description Instance Specifications CPU and memory specifications of the instance. Different instance specifications support different numbers of database connections. For details, see Instance Specifications. Storage Type The storage type determines the read/write speed of an instance. The higher the maximum throughput is, the higher the instance read/write speed can be. GaussDB supports the ultra-high I/O and extreme SSD storage types.- Ultra-high I/O: ultra-high performance cloud disks excellent for enterprise mission-critical services as well as workloads demanding high throughput and low latency.
- Extreme SSD: lightning-fast disks ideal for workloads demanding ultra-high bandwidth and ultra-low latency.
 NOTE:Extreme SSD storage is only available for authorized users. To apply for the permissions needed, submit a service ticket. Storage Space The allocated storage space contains necessary file system overhead required for inodes, reserved blocks, and database operations. When you create an instance, the storage for a single shard starts from 40 GB. You can increase the storage in increments of 4 GB. If too little storage is configured, when traffic volume is high, the storage can be used up quickly, and the instance will change to read-only. Select an amount of storage based on how much traffic you expect there to be. After buying an instance, you can scale up its storage. For details, see Scaling Up Storage Space. Free Backup Space GaussDB provides free backup storage equal to the amount of your purchased storage space. After the free backup space is used up, you will be billed for the additional space used. Disk Encryption - Disable: Encryption is disabled.
- Enable: Encryption is enabled, which improves data security but affects system performance. 
             Key Name: If disk encryption is enabled, you need to select or create a key. 
 NOTE:- When creating a pay-per-use instance with disk encryption enabled, ensure that your account has been granted the following action:
- When you create a yearly/monthly instance with disk encryption enabled, if the KMS key shared by RAM is used for the first time, create an agency as prompted.
- When using the KMS key shared by RAM to create an instance, ensure that your account has also been granted the following actions: 
               - iam:agencies:listAgencies
- iam:agencies:createAgency
- iam:roles:listRoles
- iam:permissions:listRolesForAgency
- iam:permissions:grantRoleToAgency
- kms:cmk:createGrant
 
 If a shared KMS key is used, the corresponding CTS event is createGrant. Only the key owner can receive this event. Transparent Data Encryption - Disable: Encryption is disabled.
- Enable: Encryption is enabled, which improves data security but affects system performance. 
             If you select Enable, the Key Name parameter is displayed. You can select an existing key or create a new one as the tenant key. 
 Table 4 Parameters in the Network Configuration area Parameter Description VPC A virtual network where your GaussDB instances are located. A VPC isolates networks for different workloads. You need to create or select the required VPC. If no VPC is available, GaussDB allocates a default VPC for you. After the GaussDB instance is created, the VPC cannot be changed. For details about how to create a VPC, see Creating a VPC. With VPC sharing, you can also use a VPC and subnet shared by another account. VPC owners can share the subnets in a VPC with one or multiple accounts through Resource Access Manager (RAM). This allows for more efficient use of network resources and reduces O&M costs. For more information about VPC subnet sharing, see VPC Sharing in the Virtual Private Cloud User Guide. Subnet A subnet provides dedicated network resources that are logically isolated from other networks for network security. Subnets take effect only within a specific AZ. Dynamic Host Configuration Protocol (DHCP) is enabled by default for subnets in which you plan to create GaussDB instances and cannot be disabled. GaussDB supports automatic IP address allocation during instance creation. If an IEC HomeZones is selected for AZ, create a subnet in that zone for this parameter. NOTE:- By default, a subnet supports up to 256 IP addresses. A distributed instance can require up to 1,286 IP addresses. You are advised to use a subnet that can provide 2,048 IP addresses.
 Security Group Controls access to and from an instance. When you buy an instance, the selected security group must meet the following requirements: - When buying a distributed instance, ensure that the TCP ports in the inbound rule include the following: 40000-60480, 20050, 5000-5001, 2379-2380, 6000, 6001, 6500, and <database_port>-(<database_port> + 100). (For example, if the database port is 8000, the security group must contain ports 8000 to 8100.) Additionally, ensure that the outbound security group rules allow all outbound traffic.
- When buying a centralized instance, ensure that the TCP ports in the inbound rule include the following: 20050, 5000-5001, 2379-2380, 6000, 6500, and <database_port>-(<database_port> + 100). (For example, if the database port is 8000, the TCP ports for the security group must include 8000-8100.)
 The security group enhances security by controlling access to GaussDB from other services. Ensure that the security group you selected allows your client to access the instance. If you do not need to specify a security group when creating an instance, you can submit a service ticket. If no security group is available, GaussDB allocates a default security group for you. Database Port The port is used by applications to access the database. Value range: 1024 to 39989. Default value: 8000. The following ports are used by the system and cannot be used: 2378 to 2380, 2400, 4999 to 5001, 5100, 5500, 5999 to 6001, 6009 to 6010, 6500, 8015, 8097, 8098, 8181, 9090, 9100, 9180, 9187, 9200, 12016, 12017, 20049, 20050, 21731, 21732, 32122 to 32126, and 39001. Single Private IP Address Specifies whether to enable the single private IP address policy. If this policy is enabled, only one private IP address is assigned to an instance and is bound to the primary node. The private IP address does not change after a primary/standby switchover. If this policy is disabled, each node is bound to a private IP address, and the private IP address changes after a primary/standby switchover. The constraints on the single private IP address policy are as follows: - This policy is only available for centralized instances of version V2.0-3.207 or later.
- This policy is configurable only at the time of instance creation and cannot be changed afterward.
 Table 5 Parameters in the Instance Management area Parameter Description Administrator Database administrator. The default username is root. Administrator Password Enter a strong password and periodically change it to improve security, preventing security risks such as brute force cracking. The password must contain: - 8 to 32 characters.
- At least three types of the following: uppercase letters, lowercase letters, digits, and special characters. Supported special characters: ~!@#%^*-_=+?,
 Keep the password secure. Password retrieval is not supported. After a DB instance is created, you can reset this password. For details, see Resetting the Administrator Password. Confirm Password Enter the administrator password again. Table 6 Parameters in the Additional Options area Parameter Description Parameter Template A template of parameters for creating an instance. The template contains engine configuration values that are applied to one or more instances. After creating an instance, you can modify the parameter template. You can modify the instance parameters as required after the instance is created. For details, see Modifying Parameters in a Parameter Template. Enterprise Project If the instance has been associated with an enterprise project, select the target project from the Enterprise Project drop-down list. You can also go to the Enterprise Project Management console to create a project. For details, see Enterprise Management User Guide. Table Names in M-compatible Databases This parameter controls the case sensitivity of table names in an M-compatible database. The table names here also include table aliases and the names of user views, schemas (internal databases), as well as the names of columns related to these objects in the information_schema system view. NOTICE:- The case sensitivity of M-compatible table names can only be configured during the creation of an instance and cannot be changed afterward. The default value is Case-sensitive.
- To prevent operation failures, keep this setting consistent for both instances involved in the following operations: setting up a DR relationship, restoring data from a backup, importing and exporting data, and logical decoding.
- This parameter is only available for centralized instances of version V2.0-8.203 or later.
 Time Zone Select a time zone according to the region hosting your DB instance when you buy the instance. Tag This parameter is optional. Adding tags helps you better identify and manage your DB instances. Each instance can have up to 20 tags. If your organization has configured tag policies for GaussDB, add tags to instances based on the policies. If a tag does not comply with the policies, instance creation may fail. Contact your organization administrator to learn more about tag policies. 
- Yearly/Monthly: You pay upfront for the amount of time you expect to use the DB instance for. You will need to make sure you have a top-up account with a sufficient balance or have a valid payment method configured first. 
             
- View the restoration results.
      
      A new instance that contains the same data as the backup is created. When the instance status changes from Creating to Available, the restoration is complete. The new instance is independent of the original one. 
- Click  in the upper left corner and select a region and project. in the upper left corner and select a region and project.
- Click  in the upper left corner of the page and choose . in the upper left corner of the page and choose .
- In the navigation pane, choose Backups. On the Backups page, locate the backup to be restored and click Restore in the Operation column.
      
      Alternatively, click the name of the target instance on the Instances page. In the navigation pane, choose Backups. On the Full Backups page, click the Instance Backup tab, and click Restore in the Operation column of the backup to be used for restoration. 
- Set Restoration Method to Restore to Original, select the confirmation check box, and click Next.
      
      - The instance version and node configuration must be the same as those of the original instance when the backup was created.
- Restoring to the original DB instance will overwrite all data on it and cause the DB instance to be unavailable during the restoration.
- You are advised to manually back up data before the restoration.
- If you use a backup created before advanced compression is enabled to restore data to the original instance, you must enable this feature for the instance again.
 
- Confirm the backup task information and click OK.
- View the restoration results.
      
      On the Instances page, when the instance status changes from Restoring to Available, the restoration is complete. After the restoration is complete, an instance-level full backup will be automatically triggered. After the restoration is complete, check whether the restored data is consistent with the time point to which the data is restored. 
- Click  in the upper left corner and select a region and project. in the upper left corner and select a region and project.
- Click  in the upper left corner of the page and choose . in the upper left corner of the page and choose .
- In the navigation pane, choose Backups. On the Backups page, locate the backup to be restored and click Restore in the Operation column.
      
      Alternatively, click the name of the target instance on the Instances page. In the navigation pane, choose Backups. On the Full Backups page, click the Instance Backup tab, and click Restore in the Operation column of the backup to be used for restoration. 
- Set Restoration Method to Restore to Existing, select the confirmation check box, select an existing instance, and click Next.
      
      - The selected instance must have the same engine type, engine version, OS, resource type, topology, CPU architecture, case sensitivity of M-compatible table names (for a centralized instance), replica consistency (for a centralized instance), and transaction consistency (for a distributed instance) settings as the original instance had when it was backed up.
- The storage capacity of the selected instance must be at least equal to what the original instance had when it was backed up. (For an independently deployed distributed instance whose shards have different storage: Original instance storage = Maximum shard storage x Shard quantity; Target instance storage = Minimum shard storage x Shard quantity.)
- The specifications of the selected instance must be at least equal to what the original instance had when it was backed up.
- The selected instance cannot contain read replicas.
- Restoring data to an existing instance will overwrite all data on it and cause the instance to be unavailable during the restoration.
- You are advised to manually back up data of the selected instance before the restoration.
- If there are M-compatible databases in the instance to be restored, the Table Names in M-compatible Databases parameter of the new instance must be set to the same value as that of the original instance. The default value is Case-sensitive.
- An existing instance cannot be selected as the restoration target if it is currently undergoing a full or differential backup. If the backup is not required, you can stop it before proceeding with the restoration.
- If transparent data encryption (TDE) is enabled for the original instance, TDE must also be enabled for the selected target instance and the same key must be used.
 
- Confirm the backup task information and click OK.
- View the restoration results.
      
      On the Instances page, when the instance status changes from Restoring to Available, the restoration is complete. After the restoration is complete, an instance-level full backup will be automatically triggered. 
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot 
    