Ploi API

Create backup

Please note: This endpoint will be deprecated soon. It is replaced in favor of a new endpoint: https://developers.ploi.io/844-database/2134-create-database-backup

Create backup

POST api/servers/{server}/databases/{database}/backups

Parameters

Parameter Type Status Description
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)
type string required The type to use for the backup, possible values: 'dropbox', 'ftp', 'sftp', 'local', 'google-drive' (you will need to link your google or dropbox account in order to use these 2 drivers)
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

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/databases/{database}/backups" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{"interval":10, "type": "dropbox"}'

Example response:

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

{
    "data": {
        "id": 1,
        "type": "dropbox",
        "type_human": "Dropbox",
        "path": null,
        "locations": null,
        "interval": 20,
        "table_exclusions": null,
        "active": null,
        "last_backup_at": null,
        "created_at": "2019-08-07 13:43:20"
    }
}