• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. API v3 (Recommended)
  5. Backup and Restoration
  6. Creating a Manual Backup

Creating a Manual Backup

Function

This API is used to create a manual backup.

URI

  • URI format

    PATH: /{version_id}/{project_id}/backups

    Method: POST

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    version_id

    Yes

    Specifies the API version. It is case-sensitive and the value is v3.

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    instance_id

    Yes

    String

    Specifies the DB instance ID.

    name

    Yes

    String

    Specifies the backup name. It must be 4 to 64 characters in length and start with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_).

    description

    No

    String

    Specifies the backup description. It contains a maximum of 256 characters and cannot contain the following special characters: >!<"&'=

    databases

    No

    List data structure

    Specifies a list of self-built Microsoft SQL Server databases that are partially backed up. (Only Microsoft SQL Server support partial backups.)

    For details, see Table 3.

    Table 3 databases field data structure description

    Name

    Mandatory

    Type

    Description

    name

    Yes

    String

    Specifies the names of self-built databases.

  • Request example

    Creating a manual backup for a Microsoft SQL Server DB instance:

    {
    	"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin04",
    	"name": "backup",
    "description": "manual backup",
    	"databases": [{
    		"name": "db1"
    	}, {
    		"name": "db2"
    	}]
    }

    Creating a manual backup for MySQL or PostgreSQL DB instance:

    {
    	"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01",
    	"name": "backup",
    "description": "manual backup"
    }

Normal Response

  • Parameter description
    Table 4 Parameter description

    Name

    Type

    Description

    backup

    Dictionary data structure

    Indicates the backup information.

    For details, see Table 5.

    Table 5 backup field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the backup ID.

    instance_id

    String

    Indicates the DB instance ID.

    name

    String

    Indicates the backup name.

    description

    String

    Indicates the backup description.

    databases

    Dictionary data structure

    Indicates a list of self-built Microsoft SQL Server databases that are partially backed up. (Only Microsoft SQL Server support partial backups.)

    For details, see Table 3.

    begin_time

    String

    Indicates the backup start time in the "yyyy-mm-ddThh:mm:ssZ" format, where "T" indicates the start time of the time field, and "Z" indicates the time zone offset.

    status

    String

    Indicates the backup status. Value:

    • BUILDING: Backup in progress
    • COMPLETED: Backup completed
    • FAILED: Backup failed
    • DELETING: Backup being deleted

    type

    String

    Indicates the backup type. Value:

    • auto: automated full backup
    • manual: manual full backup
    • fragment: differential full backup
    • incremental: automated incremental backup
  • Response example
    {
    	"backup": {
    		"id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe",
    		"name": "backupDemo",
    		"description": "This is a description",
    		"begin_time": "2016-09-12T01:17:05",
    		"status": "BUILDING",
    		"type": "manual",
    		"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01",
    		"databases": [{
    			"name": "db1"
    		}]
    	}
    }

Abnormal Response

For details, see Abnormal Request Results.