Create site file backup

Create a new site file backup.


POST/api/backups/file

Create site file backup

This endpoint allows you to create a new site file backup.

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 sites are on.

  • Name
    sites
    Type
    array
    Description

    An array containing the IDs of the sites 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).

  • Name
    path
    Type
    object
    Description

    The paths per site ID to be backed up.

Optional parameters

  • Name
    locations
    Type
    string
    Description

    This is only used for google-drive driver to determine which folder backups 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/file
curl -X POST "https://ploi.io/api/backups/file" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "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
  }'

Response

{
  "status": "ok",
  "message": "2 site file backup(s) have been created"
}