Ploi API
Ploi API

Create database backup

Create database backup

POST api/backups/database

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
databases array required An array containing the ID's of the databases 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)
table_exclusions string optional Comma separated string with tables you do not want to come within the backup
locations string optional This is used for google-drive driver to determine which folder backups should be put in
path string optional This is used for local driver to determine which path the backup should be put in
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

Example request:

curl -X POST "https://ploi.io/api/backups/database" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{
     "backup_configuration": 1,
     "server": 1,
     "databases": [
         1, 2, 3
     ],
     "interval": 10, 
     "keep_backup_amount": 2
}'

Example response:

HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "status": "ok",
    "message": "Backup settings have been saved for 1 database"
}