/create-standby/archiving/postgresql

Set up PostgreSQL WAL File Archiving disaster recovery

Request

HTTP Method: POST
Content Type: application/json

Parameters

Property

Type

Description

Default

Required

Property

Type

Description

Default

Required

configuration_id

integer(int64)

configuration ID (non-negative)

required

observer

boolean

enable observer

true

archive_timeout

integer(int32)

archive timeout in seconds

300

hot_standby

boolean

enable hot standby, allowing read-only connections to the standby cluster

true

source_backup_dir

string

directory for base backup on source host

source_log_dir

string

directory for archived WAL files on source host

standby_backup_dir

string

directory for base backup on standby host

standby_conf_dir

string

directory for the standby cluster config files on standby host

standby_data_dir

string

directory for the standby cluster data files on standby host

standby_log_dir

string

directory for archived WAL files on standby host

tablespace_dir

string map

customize directory on standby for tablespaces

{ "params": { "archive_timeout": 300, "configuration_id": 1, "hot_standby": true, "observer": true, "source_backup_dir": "string", "source_log_dir": "string", "standby_backup_dir": "string", "standby_conf_dir": "string", "standby_data_dir": "string", "standby_log_dir": "string", "tablespace_dir": { "table_space": "dir" } } }

Response

HTTP Status: 200

Content Type: application/json

Response

Property

Type

Description

Property

Type

Description

error

object of type error_response

error response

result

object of type task_response

successful

boolean

response with error or not

error_response

Property

Type

Description

Property

Type

Description

message

string

error message

task_response

Property

Type

Description

Property

Type

Description

task_id

integer(int64)

task ID

{ "error": { "message": "string" }, "result": { "task_id": 1 }, "successful": true }

HTTP Status: 400

Content Type: application/json

Response

Property

Type

Description

Property

Type

Description

error

object of type error_response

error response

successful

boolean

always false

error_response

Property

Type

Description

Property

Type

Description

message

string

error message

{ "error": { "message": "string" }, "successful": false }