GET/stacks/:stack_id/backups/:id
Get Backuppublic
Required Parameters
stack_id
stringThe stack UID
id
integerBackup ID
Get information about a single backup.
Related Models:Backup
Request
GET
/stacks/:stack_id/backups/:idcurl -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
Get Backup Filepublic
Required Parameters
stack_id
stringThe stack UID
backup_id
integerBackup ID
id
stringThe file ID
Get the public URL to a backup file.
Related Models:Backup
Request
GET
/stacks/:stack_id/backups/:backup_id/files/:idcurl -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
List Backup Filespublic
Required Parameters
stack_id
stringThe stack UID
backup_id
integerBackup ID
Get list of all backup files of a stack.
Request
GET
/stacks/:stack_id/backups/:backup_id/filescurl -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
List Backupspublic
Required Parameters
id
stringThe stack UID
Optional Parameters
group
integerBackup group ID
db_type
stringBackup database type (valid options are: mysql, postgresql, redis, mongodb)
Get list of all backups of stack.
Request
GET
/stacks/:id/backupscurl -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
Create Backupadmin
Required Parameters
stack_id
stringThe stack UID
Optional Parameters
db_type
stringComma separated list of Database types which need backup tasks (valid options: all, mysql, postgresql, redis, mongodb)
frequency
stringFrequency of backup task in cron schedule format
keep_count
integerNumber of previous backups to keep
gzip
booleanCompress your backups with gzip
excluded_tables
stringTables that must be excluded from the backup
run_on_replica_server
booleanRun backup task on replica server if available
Create a new backup task.
Related Models:Backup
Request
POST
/stacks/:stack_id/backupscurl -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
Import Backupadmin
Required Parameters
stack_id
stringThe stack UID
group
integerThe group ID of backups that imported backup must restored in
db_type
stringComma separated list of Database types which need backup tasks (valid options: mysql, postgresql, redis, mongodb)
remote_url
stringA URL to backup file to be imported
Import an external backup.
Related Models:Backup
Request
POST
/stacks/:stack_id/backupscurl -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"
}
}