Create site file backup
Create site file backup
POST api/backups/file
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
backup_configuration | integer | required | The ID of your backup configuration that's configured in your profile |
server | integer | required | The ID of the server that the databases are in |
sites | array | required | An array containing the ID's of the sites you want to back up |
interval | integer | required | Must be either of these values: 0, 10, 20, 30, 40, 50, 60, 120, 240, 480, 720, 1440 (0 = nightly, the rest is each minute) |
locations | string | optional | This is only used for google-drive driver to determine which folder backups should be put in |
path | object | required | The paths per site ID to be backed up |
keep_backup_amount | integer | optional | This is used to determine how many backups should be saved |
custom_name | string | optional | This is used to define a custom archive name |
password | string | optional | Specify a password to be used for the ZIP archive |
Example request:
curl -X POST "https://ploi.io/api/backups/file" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data '{
"backup_configuration": 1,
"interval": 60,
"server": 1,
"sites": [
1,
2
],
"path": {
"1": "/home/ploi/ploi.io",
"2": "/home/ploi/examplehosting.com"
},
"keep_backup_amount": 2
}'
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"status": "ok",
"message": "2 site file backup(s) have been created"
}