Skip to content

Commit

Permalink
Snapshot call format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NedPK committed Sep 26, 2024
1 parent 4f68055 commit 6d09444
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/Backup and Restore/Bring Your Own Bucket Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ To set up an external storage backup, you need to make the following API call:
--data '{
"backup_type": "full",
"schedule": "0 2 ** *",
"service_id": "dbtgf28044362",
"service_id": "dbpgf28044362",
"external_storage": {
"bucket": {
"path": "s3://my_backup_bucket",
Expand Down
31 changes: 14 additions & 17 deletions docs/Backup and Restore/Snapshot Backup Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,31 @@ Use it on subsequent request, e.g:

curl --location 'https://api.skysql.com/skybackup/v1/backups/schedules' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "X-API-Key: $API_KEY" \
--data "{
\"backup_type\": \"snapshot\",
\"schedule\": \"once\",
\"service_id\": \"$SERVICE_ID\"
}"

--header 'X-API-Key: $API_KEY' \
--data '{
"backup_type": "snapshot",
"schedule": "once",
"service_id": "$SERVICE_ID"
}'

- API_KEY : SKYSQL API KEY, see [SkySQL API Keys](https://app.skysql.com/user-profile/api-keys/)
- SERVICE_ID : SkySQL serivce identifier, format dbtxxxxxx. You can fetch the service ID from the Fully qualified domain name(FQDN) of your service. E.g: in dbpgf17106534.sysp0000.db2.skysql.com, 'dbpgf17106534' is the service ID.You will find the FQDN in the [Connect window](https://app.skysql.com/dashboard)

#### Cron Snapshot Example


curl --location 'https://api.skysql.com/skybackup/v1/backups/schedules'
curl --location 'https://api.skysql.com/skybackup/v1/backups/schedules' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "X-API-Key: $API_KEY" \
--data "{
\"backup_type\": \"snapshot\",
\"schedule\": \"0 3 * * *\",
\"service_id\": \"$SERVICE_ID\"
}"
--header 'X-API-Key: $API_KEY' \
--data '{
"backup_type": "snapshot",
"schedule": "0 3 * * *",
"service_id": "$SERVICE_ID"
}'

- API_KEY : SKYSQL API KEY, see [SkySQL API Keys](https://app.skysql.com/user-profile/api-keys/)
- SCHEDULE : Cron schedule, see [Cron](https://en.wikipedia.org/wiki/Cron)
- SERVICE_ID : SkySQL serivce identifier, format dbtxxxxxx
- SERVICE_ID : SkySQL serivce identifier, format dbxxxxxx


##### Backup status can be fetch using 'https://api.skysql.com/skybackup/v1/backups'. See the 'Backup Status' section for an example.
Expand Down

0 comments on commit 6d09444

Please sign in to comment.