All Products
Search
Document Center

ConfigureBackupPlan

Last Updated: Mar 18, 2020

Description

You can call this operation to configure a DBS backup schedule.

The DBS instance starts working after you call the CreateBackupPlan operation. Then, you have to wait 5 seconds in most cases before calling the ConfigureBackupPlan operation.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set the value to ConfigureBackupPlan.
BackupPlanId String Yes The ID of the backup schedule.
SourceEndpointInstanceType String Yes The location of the database. Valid values:
  • rds
  • ecs
  • express: for databases connected to Alibaba Cloud through Express Connect, VPN Gateway, or Smart Access Gateway.
  • agent: for databases connected to Alibaba Cloud through a backup gateway.
  • dds: for ApsaraDB for MongoDB databases.
  • other: for databases connected to Alibaba Cloud through IP addresses and port numbers.
SourceEndpointRegion String No The region of the database. This parameter is required if the value of the SourceEndpointInstanceType parameter is rds, ecs, dds, express, or agent.
SourceEndpointInstanceID String No The ID of the database instance. This parameter is required if the value of the SourceEndpointInstanceType parameter is rds, ecs, dds, or express.
SourceEndpointIP String No The connection endpoint of the database. This parameter is required if the value of the SourceEndpointInstanceType parameter is express, agent, or other.
SourceEndpointPort Integer No The port number of the database. This parameter is required if the value of the SourceEndpointInstanceType parameter is express, agent, other, or ecs.
SourceEndpointDatabaseName String No The name of the database. This parameter is required for PostgreSQL databases, MongoDB databases, and agent-based MSSQL databases.
SourceEndpointUserName String No The username for logging on to the database. This parameter is required for most databases, except for Redis databases and agent-based MSSQL databases.
SourceEndpointPassword String No The password for logging on to the database. This parameter is required for most databases, except for Redis databases and agent-based MSSQL databases.
BackupGatewayId Long No The ID of the backup gateway. This parameter is required if the value of the SourceEndpointInstanceType parameter is agent.
OSSBucketName String No The name of the OSS bucket. By default, the name is dynamically generated by the system.
BackupObjects String No The objects to be backed up. For more information, see the description of the BackupObjects parameter. This parameter is required for most databases, except for agent-based databases.
BackupPeriod String Yes The day of each week when the full backup task runs. Valid values:
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
BackupStartTime String Yes The start time of the full backup task. Specify the time in the HH:mm format. Example: 14:22.
EnableBackupLog Boolean Yes Specifies whether to enable incremental log backup. Valid values:
  • True
  • False
BackupRetentionPeriod Integer No The number of days during which the backup data is retained. Valid values: 0 to 1825. Default value: 730.
DuplicationInfrequentAccessPeriod Integer No The number of days after which the storage class of the backup data is changed to IA. Default value: 180.
DuplicationArchivePeriod Integer No The number of days after which the storage class of the backup data is changed to Archive. Default value: 365.
BackupPlanName String Yes The name of the backup schedule.
SourceEndpointOracleSID String No The system ID (SID) of the Oracle database. This parameter is required for Oracle databases.

BackupObjects

The BackupObjects parameter is defined as a JSON string. Certain regular expressions can be used in the object configuration.

The BackupObjects parameter is defined as follows:

[
    {
        "DBName":"Name of the database to be backed up",
        "SchemaName":"Schema name of the database to be backed up",
        "TableIncludes":[{
            "TableName":"Name of the table to be backed up"
        }],
        "TableExcludes":[{
            "TableName":"Name of the table to be excluded during the backup"
        }]
    }
]

SchemaName and NewSchemaName are applicable only to MSSQL databases. DBName and NewDBName are used to specify the names of other databases.

If you only specify the DBName parameter and do not specify lower levels of objects, all objects in the database are migrated.

If you specify the DBName parameter and some lower levels of objects, the objects that are not specified are not migrated by default. You can use the following regular expressions to define different object names:

  • A period (.) matches any single character except '\r\n'.
  • An asterisk () matches zero or more occurrences of a subexpression which occurs before. For example, h.llo matches strings such as hllo and heeeello.
  • A question mark (?) matches zero or one occurrence of a subexpression which occurs before. For example, h.?llo matches hllo and hello, but not haello.
  • The [characters] character set matches any character included in the brackets ([ ]). For example, h[aello] matches hallo and hello.
  • The [^characters] negative character set does not match any character included in the brackets ([ ]). For example, h[^ae]llo matches hcllo and hdllo, but not hallo or hello.
  • The [character1-character2] character range matches any character included in the range from character1 to character2, for example, [0-9] and [a-z].

Response parameters

Parameter Type Description
BackupPlanId String The ID of the backup schedule.

Error codes

Error code Error message Description
BackupPlanNotConfigure Backup Plan not Configure. The error message returned because the backup schedule cannot be configured.