Create Manual Backup
This API creates a manual backup of the selected scopes and stores it at the specified location. The API returns the backup ID and the encryption key used to restore the backup.
Endpoint Details
| URL | /v1/backup/create |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Body
Use the following format to make a request:
JSON Request
{
"file_name": "dummy",
"description": "",
"scopes": [
1,
2
],
"destination_type": 1,
"local_path": "/tmp/backups/",
"s3_config": {
"bucket_name": "",
"region": "",
"access_key_id": "",
"secret_access_key": "",
"path_prefix": ""
}
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| file_name | String | Name of the backup file |
| description | String | Optional description of the backup |
| scopes | Array | List of scope codes to include in the backup |
| destination_type | Integer | Type of destination where the backup file is stored |
| local_path | String | Local path where the backup file is stored, used for local disk destinations |
| s3_config | Object | S3 destination configuration, used for S3 destinations |
| bucket_name | String | Name of the S3 bucket where the backup file is stored |
| region | String | Region of the S3 bucket |
| access_key_id | String | Access key ID used to authenticate to S3 |
| secret_access_key | String | Secret access key used to authenticate to S3 |
| path_prefix | String | Path prefix applied to the backup file within the bucket |
Response
Here is an example response after the request has been successfully processed:
Response
{
"backup_id": "f614f86f-3011-4ba7-99cc-db0ba9632c0e",
"encryption_key": "/zrndJiXfqIyH0+95HqCHtZ9WcyQV46oZkk4oRpgRVY="
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| backup_id | UUID | Unique identifier of the created backup |
| encryption_key | String | Encryption key used to restore the backup file |
info
- A valid Bearer Token is required to access this endpoint.
- The
scopesarray specifies which data scopes are included in the backup. Supported scope codes are:1= System Configuration2= Keys3= Audit Log4= System Log
- The
destination_typedetermines where the backup file is stored:1= Local disk — stores the backup file directly on the server's local storage. Provide thelocal_pathvalue.3= S3 — stores the backup in an Amazon S3-compatible object storage. Provide thes3_configobject.
- Only the fields relevant to the selected
destination_typeneed to be filled. The unused destination fields can be left empty. - The
encryption_keyis returned only once at creation time and is required to restore the backup. Store it securely, as it cannot be retrieved again.