Addons /
Backup addon
Required permission
Project > Addons > General > Update
Path parameters
projectId
string requiredID of the project
addonId
string requiredID of the addon
Request body
- {object}
name
stringThe name of the backup. If not provided, a default name will be generated containing the current date.
min length3max length39pattern^[a-zA-Z0-9]+((-|\s|\/|:)[a-zA-Z0-9]+)*$backupType
stringThe type of backup to perform. Defaults to
snapshot
.one ofdump, snapshotcompressionType
stringThe compression algorithm of the backup. Only applicable for dump backups. Defaults to
gz
.one ofgz, zstd
Response body
- {object}
Response object.
data
{object} requiredResult data.
id
string requiredThe identifier for the backup.
name
string requiredThe name of the backup.
status
string requiredThe current status of the backup.
one ofscheduled, in-progress, completed, aborting, aborted, failed, not-supportedcreatedAt
string requiredThe time the backup was initiated.
completedAt
stringThe time the backup was completed.
config
{object} requiredData about the backup configuration.
source
{object}Data about the source of the backup.
type
stringThe type of backup.
one offileUpload, liveInstance, snapshot, externalDump, sameAddonsize
string requiredThe size of the backup, in bytes
addonVersion
stringThe version of the addon at the time of the backup. If the backup type is
snapshot
, the addon will be restored to this version when the backup is restored.lastRestore
{object}Details about the most recent restore of this backup.
restoreTimestamp
string requiredThe time the backup was initiated.
status
string requiredThe current status of the restore.
one ofscheduled, in-progress, completed, aborting, aborted, failed, not-supportedcompletedAt
stringThe time the restore was completed.
POST /v1/projects/{projectId}/addons/{addonId}/backups
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"Example Backup","backupType":"snapshot","compressionType":"gz"}' \
https://api.northflank.com/v1/projects/{projectId}/addons/{addonId}/backups
Example response
200 OK
JSON
{
"data": {
"id": "example-backup",
"name": "Example Backup",
"status": "completed",
"createdAt": "2021-01-20T11:19:53.175Z",
"completedAt": "2021-01-20T11:19:54.494Z",
"config": {
"source": {
"type": "snapshot"
},
"size": "1234",
"addonVersion": "4.4.8"
},
"lastRestore": {
"restoreTimestamp": "2021-01-20T11:19:54.494Z",
"status": "completed",
"completedAt": "2021-01-20T11:19:54.494Z"
}
}
}