Document Database Service

Modify the Backup Policy of an Instance

2025-07-25 03:17:22
API Introduction

Call modifyBackupPolicy to modify the backup policy of the instance.

API Restrictions

None

URI
POST /v1/openApi/modifyBackupPolicy

Path Parameter

None

Query Parameter

None

Request Parameters

Request Header Parameter

None

Request Body Parameter

Parameter

Required or Not

Parameter Type

Description

Example

prodInstId

*Required

String

External instance ID of the document database

a649077e15f349cb8b4cde6f7285a568

nextbackuptime

*Required

String

Next backup point in time

9/1/2022 12:00:00 AM

backupunittime

*Required

String

The time interval between every two backups, in seconds

1

backupinterval

*Required

String

Total number of backups in a single cycle

1

autoremove

*Required

String

Number of copies automatically saved

1

backupOperation

*Required

String

Whether to enable automatic backup

1

env

*Required

String

Runtime Environment

cty

host

*Required

String

Host address

127.0.0.1

sshPort

*Required

String

Machine port

8888

sshUser

*Required

String

Machine user

root

password

*Required

String

Encrypted machine login password

jr1odEulRRc//w==

backupDir

*Required

String

Backup directory

/data/mongodb

Response Parameter

Parameter

Required or Not

Parameter Type

Description

Example

Lower-level Object

statusCode

Yes

Integer

Response Code

Value range: 800 indicates success, 900 indicates failure

800


message

Yes

String

Response information

Backup policy modification succeeded/failed


Sample Request

Request Header

None

Request Body

{
    "prodInstId":"a649077e15f349cb8b4cde6f7285a568",
    "nextbackuptime":"2022-09-01 00:00:00",
    "backupunittime":"1",
    "backupinterval":"1",
    "autoremove":"1",
    "backupOperation":"1",
    "env":"",
    "host":"127.0.0.1",
    "sshPort":"8888",
    "sshUser":"root",
    "password":"jr1odEulRRc//w==",
    "backupDir":"/data/mongodb",
    "env": "cty"
}
Response Example
{
    "statusCode": 800,
    "message": "the backup policy of the MongoDB instance is modified successfully",
    "returnObj": null
}
Status Code

Status Code

Description

800

Indicate that the request succeeded

900

Indicates that the request failed

Error Codes

None


91GywL0axH90