Backup Principles and Solutions
DDS instances support automated and manual backups. You can periodically back up databases. If a database is faulty or data is damaged, you can restore the database using backup files to ensure data reliability.
Backup Principles
- Cluster instance
A cluster instance consists of a config node, and multiple dds mongos and shard nodes. The config node is used to store the configuration information of a cluster instance, and the shard node is used to store data of a cluster instance. Backing up a cluster instance means that data on the config and shard nodes is backed up separately. As shown in Figure 1, the config and shard nodes in a cluster instance are backed up to their own hidden nodes. The backup process occupies certain CPU and memory resources of the hidden nodes. During the backup, the CPU usage, memory usage, and primary/standby delay of the hidden node increase slightly, which is normal. The backup files on the hidden nodes will then be compressed and stored in OBS, and the storage space of the instance will not be occupied.
- Replica set instance
As shown in Figure 2, replica set instance data is backed up on hidden nodes. The backup process occupies certain CPU and memory resources of the hidden node. During the backup, the CPU usage, memory usage, and primary/standby delay of the hidden node increase slightly, which is normal. The backup files on the hidden nodes will then be compressed and stored in OBS, and the storage space of the instance will not be occupied.
- Single node instance:
Single-node instance backup is performed on only one node. The backup file is stored in OBS as a package, which does not occupy the storage of the instance.
A single node instance is backed up using mongodump. During the backup, CPU and memory resources of the node are occupied. If the resources are insufficient, the backup fails. You are advised to migrate the single-node instance data to a replica set instance for backup.
Figure 3 Single-node instance backup principle
Backup and Restoration Solution
- Table 1 describes how to back up and download backup files.
By default, all DDS versions 3.2, 3.4, 4.0, 4.2, and 4.4 are supported unless otherwise specified.
Table 1 Backup solutions Task Type
Method
Instance Type and Version
Scenario
Backing up data
- Cluster
- Replica set
- Single node
You can perform automated backup for DDS instances on the management console.
- Cluster (versions 4.0 and 4.2)
- Replica set (versions 4.0 and 4.2)
You can perform incremental backup for DDS instances on the management console.
- Cluster
- Replica set
- Single node
You can perform cross-region backup on the DDS console.
- Cluster
- Replica set
- Single node
You can perform manual backup for DDS instances on the management console.
- Cluster
- Replica set
- Single node
You can use the backup and restoration tool provided by the MongoDB client to back up your self-built MongoDB database or MongoDB database on the cloud.
- Cluster
- Replica set
- Single node
You can use the backup and restoration tool provided by the MongoDB client to back up your self-built MongoDB database or MongoDB database on the cloud.
Downloading a backup file
- Cluster
- Replica set
- Single node
If the size of a backup file is greater than 400 MB, use OBS Browser+ to download the file.
- Replica set
- Single node
You can directly download backup files using a browser.
- Cluster
- Replica set
- Single node
You can download backup files in a new browser window, or using Xunlei or Wget.
- For details about the DDS restoration scheme, see Solutions.
Billing
Backups are saved as packages in OBS buckets. Backups occupy backup space in OBS. If the free space DDS provides is used up, the additional space required will be billed. For the billing details, see How Is DDS Backup Data Billed?
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