文档数据库服务 DDS-恢复到新实例:请求示例

时间:2024-12-04 09:31:55

请求示例

  • 集群根据备份文件恢复到新实例:
    {
      "name": "test-cluster-01",
      "datastore": {
        "type": "DDS-Community",
        "version": "3.2",
        "storage_engine": "wiredTiger"
      },
      "region": "aaa",
      "availability_zone": "az1xahz",
      "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
      "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007",
      "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58",
      "password": "******",
      "mode": "Sharding",
      "configurations": [
        {
          "type": "mongos",
          "configuration_id": "acb288dbd1174f26a8960b45591bd98apr02"
        },
        {
          "type": "shard",
          "configuration_id": "5bca546f0be64b038124ef9cedd1bfa1pr02"
        },
        {
          "type": "config",
          "configuration_id": "4d123b3ba8294921802b11bf4d8c5735pr02"
        }
      ],
      "restore_point": {
        "backup_id": "8f643d252d834a4c916b2db4322f99552734"
      },
      "flavor": [
        {
          "type": "mongos",
          "num": "2",
          "spec_code": "dds.mongodb.c6.medium.4.mongos"
        },
        {
          "type": "shard",
          "num": 2,
          "storage": "ULTRAHIGH",
          "size": 20,
          "spec_code": "dds.mongodb.c6.medium.4.shard"
        },
        {
          "type": "config",
          "num": 1,
          "storage": "ULTRAHIGH",
          "size": 20,
          "spec_code": "dds.mongodb.c6.large.2.config"
        }
      ],
      "backup_strategy": {
        "start_time": "08:15-09:15",
        "keep_days": "8"
      },
      "ssl_option": "1",
      "dss_pool_id": "f5f84ed7-6f19-4bd4-99d7-b450ad6cc4dd",
      "server_group_policies": [
        "anti-affinity"
      ],
      "tags": [
        {
          "key": "dds001",
          "value": "dds001"
        }
      ]
    }
  • 副本集根据备份文件恢复到新实例:
    {
        "name": "test-replicaset",
        "datastore": {
          "type": "DDS-Community",
          "version": "3.4",
          "storage_engine": "wiredTiger"
        },
        "region": "aaa",
        "availability_zone": "az1xahz",
        "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
        "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007",
        "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58",
        "password": "******",
        "mode": "ReplicaSet",
        "configurations": [
            {
                "type": "replica",
                "configuration_id": "f17e3aad778440fbb68603c8c9032003pr02"
            }
        ],
        "restore_point": {
            "backup_id": "8f643d252d834a4c916b2db4322f99552734"
        },
        "flavor": [
            {
                "type": "replica",
                "num": "1",
                "storage": "ULTRAHIGH",
                "size": "30",
                "spec_code": "dds.mongodb.s2.medium.4.shard"
            }
        ],
        "backup_strategy": {
            "start_time": "08:15-09:15",
            "keep_days": "8"
        },
        "ssl_option": "1",
        "tags" : [{ 
           "key" : "dds001", 
           "value" : "dds001" 
        }]
    }
  • 单节点根据备份文件恢复到新实例:
    {
      "name": "test-singlenode",
      "datastore": {
        "type": "DDS-Community",
        "version": "3.2",
        "storage_engine": "wiredTiger"
      },
      "region": "aaa",
      "availability_zone": "az1xahz",
      "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
      "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007",
      "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58",
      "password": "******",
      "mode": "Single",
      "configurations": [
        {
          "type": "single",
          "configuration_id": "b8e962e66ede47609a94cba591735b49pr02"
        }
      ],
      "restore_point": {
        "backup_id": "8f643d252d834a4c916b2db4322f99552734"
      },
      "flavor": [
        {
          "type": "single",
          "num": "1",
          "storage": "ULTRAHIGH",
          "size": "30",
          "spec_code": "dds.mongodb.c6.medium.4.single"
        }
      ],
      "backup_strategy": {
        "start_time": "08:15-09:15",
        "keep_days": "8"
      },
      "ssl_option": "1",
      "tags" : [{ 
        "key" : "dds001", 
        "value" : "dds001" 
      }]
    }
  • 副本集根据时间点恢复到新实例:
    {
      "name": "replica-liuyunj1",
      "datastore": {
        "type": "DDS-Community",
        "version": "3.2",
        "storage_engine": "wiredTiger"
      },
      "region": "aaa",
      "availability_zone": "az1xahz",
      "vpc_id": "dcdadabc-efed-4518-8b34-4af66fcd97e7",
      "subnet_id": "4a9348f2-f232-4700-a440-2f1641d80960",
      "security_group_id": "c57b9db2-cccb-4c0d-b058-7ea51dda0c99",
      "mode": "ReplicaSet",
      "flavor": [
        {
          "type": "replica",
          "num": 1,
          "storage": "ULTRAHIGH",
          "size": 100,
          "spec_code": "dds.mongodb.c6.large.2.repset"
        }
      ],
      "backup_strategy": {
        "start_time": "08:00-09:00",
        "keep_days": "8"
      },
      "restore_point": {
        "instance_id": "d5833c2854a4486cb7960f829269e211in02",
        "type": "timestamp",
        "restore_time": 1607689584000
      },
      "ssl_option": "1",
      "tags" : [{ 
        "key" : "dds001", 
        "value" : "dds001" 
      }]
    }
support.huaweicloud.com/api-dds/dds_api_0038.html