Logo

Command Palette

Search for a command to run...

GET/stacks/:stack_id/backups/:id

Required Parameters

stack_idstring
The stack UID
idinteger
Backup ID

Get information about a single backup.

Related Models:Backup

Request

GET
/stacks/:stack_id/backups/:id
curl -X GET \
  "https://app.cloud66.com/api/3/stacks/:stack_id/backups/:id" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": {
    "id": 1,
    "server_uid": "e63e859d5ab72b0bcf14321f0ffb013d",
    "db_type": "mysql",
    "database_name": "shab-test-db",
    "file_base": "",
    "backup_date_iso": "2014-09-01T18:16:16Z",
    "backup_status": 0,
    "backup_result": "",
    "restore_status": 0,
    "restore_result": null,
    "created_at_iso": "2014-09-01T18:16:16Z",
    "updated_at_iso": "2014-09-01T18:16:16Z",
    "verify_status": 0,
    "verify_result": null,
    "storage_path": "2aad2bb5a70e621ecf251fbd85af6927/backups/3c656a1bcc160769762763c6276c18b9/mysql/test_db_11/2014.09.01.18.16.14",
    "skip_tables": "",
    "backup_size": 0
  }
}
GET/stacks/:stack_id/backups/:backup_id/files/:id

Required Parameters

stack_idstring
The stack UID
backup_idinteger
Backup ID
idstring
The file ID

Get the public URL to a backup file.

Related Models:Backup

Request

GET
/stacks/:stack_id/backups/:backup_id/files/:id
curl -X GET \
  "https://app.cloud66.com/api/3/stacks/:stack_id/backups/:backup_id/files/:id" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": {
    "ok": true,
    "public_url": "https://c66-managed-backup-non-prod.s3.amazonaws.com/2aad2bb5a70e621ecf251fbd85af6927/backups/3c656a1bcc160769762763c6276c18b9/mysql/test_db_11/2014.09.01.18.16.14/test_db_11.tar?AWSAccessKeyId=AKIAIKCYITLQBEJDIETQ&Expires=1409603570&Signature=C2au7Jq%252F1m6uHGHRfGJPn%252F2GSS8%253D"
  }
}
GET/stacks/:stack_id/backups/:backup_id/files

Required Parameters

stack_idstring
The stack UID
backup_idinteger
Backup ID

Get list of all backup files of a stack.

Related Models:BackupPagination

Request

GET
/stacks/:stack_id/backups/:backup_id/files
curl -X GET \
  "https://app.cloud66.com/api/3/stacks/:stack_id/backups/:backup_id/files" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": [
    {
      "id": "tar",
      "name": "test_db_11.tar"
    }
  ],
  "count": 1,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 1,
    "pages": 1
  }
}
GET/stacks/:id/backups

Required Parameters

idstring
The stack UID

Optional Parameters

groupinteger
Backup group ID
db_typestring
Backup database type (valid options are: mysql, postgresql, redis, mongodb)

Get list of all backups of stack.

Related Models:BackupPagination

Request

GET
/stacks/:id/backups
curl -X GET \
  "https://app.cloud66.com/api/3/stacks/:id/backups?group=15&db_type=mysql" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": [
    {
      "id": 4,
      "server_uid": "e63e859d5ab72b0bcf14321f0ffb013d",
      "db_type": "mysql",
      "database_name": "test-db",
      "file_base": "",
      "backup_date_iso": "2014-09-01T19:00:33Z",
      "backup_status": 0,
      "backup_result": "",
      "restore_status": 0,
      "restore_result": null,
      "created_at_iso": "2014-09-01T19:00:33Z",
      "updated_at_iso": "2014-09-01T19:00:33Z",
      "verify_status": 0,
      "verify_result": null,
      "storage_path": "2aad2bb5a70e621ecf251fbd85af6927/backups/3c656a1bcc160769762763c6276c18b9/mysql/test_db_11/2014.09.01.19.00.31",
      "skip_tables": "",
      "backup_size": 0
    },
    {
      "id": 1,
      "server_uid": "e63e859d5ab72b0bcf14321f0ffb013d",
      "db_type": "mysql",
      "database_name": "test-db",
      "file_base": "",
      "backup_date_iso": "2014-09-01T18:16:16Z",
      "backup_status": 0,
      "backup_result": "",
      "restore_status": 0,
      "restore_result": null,
      "created_at_iso": "2014-09-01T18:16:16Z",
      "updated_at_iso": "2014-09-01T18:16:16Z",
      "verify_status": 0,
      "verify_result": null,
      "storage_path": "2aad2bb5a70e621ecf251fbd85af6927/backups/3c656a1bcc160769762763c6276c18b9/mysql/test_db_11/2014.09.01.18.16.14",
      "skip_tables": "",
      "backup_size": 0
    }
  ],
  "count": 2,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 2,
    "pages": 1
  }
}
POST/stacks/:stack_id/backups

Required Parameters

stack_idstring
The stack UID

Optional Parameters

db_typestring
Comma separated list of Database types which need backup tasks (valid options: all, mysql, postgresql, redis, mongodb)
frequencystring
Frequency of backup task in cron schedule format
keep_countinteger
Number of previous backups to keep
gzipboolean
Compress your backups with gzip
excluded_tablesstring
Tables that must be excluded from the backup
run_on_replica_serverboolean
Run backup task on replica server if available

Create a new backup task.

Related Models:Backup

Request

POST
/stacks/:stack_id/backups
curl -X POST \
  "https://app.cloud66.com/api/3/stacks/:stack_id/backups?db_type=mysql,redis&frequency=0 */1 * * *&keep_count=10&gzip=false&excluded_tables=my_log_table&run_on_replica_server=false" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "stack_id": "5999b763474b0eafa5fafb64bff0ba80"
}'

Response

{
  "response": {
    "ok": true,
    "message": "queued for creation"
  }
}
POST/stacks/:stack_id/backups

Required Parameters

stack_idstring
The stack UID
groupinteger
The group ID of backups that imported backup must restored in
db_typestring
Comma separated list of Database types which need backup tasks (valid options: mysql, postgresql, redis, mongodb)
remote_urlstring
A URL to backup file to be imported

Import an external backup.

Related Models:Backup

Request

POST
/stacks/:stack_id/backups
curl -X POST \
  "https://app.cloud66.com/api/3/stacks/:stack_id/backups" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "stack_id": "5999b763474b0eafa5fafb64bff0ba80",
  "group": "5",
  "db_type": "mysql",
  "remote_url": "https://s3.amazonaws.com/c66-managed-backup-non-prod/2aad2bb5a70e621ecf251fbd85af6927/backups/09a7dec0efdaa19b44148fccbf6128ec/redis/redis_23/2014.07.01.07.00.46/redis_23.tar"
}'

Response

{
  "response": {
    "ok": true,
    "message": "Your external backup queued for upload"
  }
}