Back up now
POST/api/v1/vps/{vps_uuid}/backup
Takes a backup now. One runs at a time and three a day; manual ones count toward the 5 kept.
Parameters
| Name | In | Description |
|---|---|---|
| vps_uuid | path, stringrequired | VPS id, from Create a VPS or List VPS |
Example request
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/backup" \
-H "Authorization: Bearer $API_TOKEN"import os, requests
token = os.environ["API_TOKEN"]
vps_uuid = "12d46f8c-d66e-4163-99aa-1245d5b06e5b"
r = requests.post(
f"https://platform.serverscamp.com/api/v1/vps/{vps_uuid}/backup",
headers={"Authorization": f"Bearer {token}"},
)
r.raise_for_status()
print(r.json())const vpsUuid = '12d46f8c-d66e-4163-99aa-1245d5b06e5b';
const r = await fetch(`https://platform.serverscamp.com/api/v1/vps/${vpsUuid}/backup`, {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.API_TOKEN}` },
});
console.log(r.status, await r.json());Answer
Status 200 with this body.
| Field | Type | Description |
|---|---|---|
| vps_uuid | stringrequired | |
| status | stringrequired | What the server does now; poll Get a VPS to see it finish |
{
"vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
"status": "backing_up"
}Errors
| Status | When |
|---|---|
401 | No token, or a token that is not valid |
409 | Backups are off, or a backup is already running |
422 | The body or a parameter is not what the operation takes |
429 | Three manual backups in the last 24 hours |
Every operation can also answer 401 without a valid token. All errors