Create database backup

Create a new database backup configuration.


POST/api/backups/database

Create database backup

This endpoint allows you to create a new database backup configuration.

Required parameters

  • Name
    backup_configuration
    Type
    integer
    Description

    The ID of your backup configuration that's configured in your profile.

  • Name
    server
    Type
    integer
    Description

    The ID of the server that the databases are in.

  • Name
    databases
    Type
    array
    Description

    An array containing the ID's of the databases you want to back up.

  • Name
    interval
    Type
    integer
    Description

    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).

Optional parameters

  • Name
    table_exclusions
    Type
    string
    Description

    Comma separated string with tables you do not want to include in the backup.

  • Name
    locations
    Type
    string
    Description

    This is only used for google-drive driver to determine which folder backups should be put in.

  • Name
    path
    Type
    string
    Description

    This is used for local driver to determine which path the backup should be put in.

  • Name
    keep_backup_amount
    Type
    integer
    Description

    This is used to determine how many backups should be saved.

  • Name
    custom_name
    Type
    string
    Description

    This is used to define a custom archive name.

  • Name
    password
    Type
    string
    Description

    Specify a password to be used for the ZIP archive.

Request

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

Response

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