2.0
Table Of Contents
- VMware vFabric Data Director API Programming Guide
Safeguarding Data 9
As with any database system, it is important to safeguard your data by performing backups on a regular
schedule.
This section gives you and example of how to backup and restore a database using the REST API.
This chapter includes the following topics:
n
“Backing Up Data,” on page 35
n
“Restoring Data,” on page 35
Backing Up Data
This call will create a snapshot backup for a database.
In this example, we assume that you have created a database, and that the ID of the database is 98.
Here is an example of the REST API request to create a database with these assumptions.
POST https://example.aurora.com\
/datadirector/api/database/98/backups
Content-Type : application/json
Authorization : Basic YWRtaW5AYXVyb3JhLnZtd2FyZS5jb206Y2xvdWRibXM=
Accept : application/json
{
"createBackup": {
"label": "REST API example",
"snapshotBackup": true
}
}
The following is an example of the corresponding response. This response includes a task in header that tracks
the backup.
202 Accepted
location : https://example.aurora.com\
/datadirector/api/task/82
Restoring Data
This call restores a database from one of its backups
In this example, we assume that you have created a database, and that the ID of the database is 98. In addition,
you have created a backup of the database, and the ID of the backup is 3.
VMware, Inc.
35










