This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
Backup and restore
You can use these API calls to perform backup and restore tasks for your database.
You can use these API calls to perform backup and restore tasks for your database.
1 - GET backups
Returns a list of all backups created for vbr configuration (*.ini) files that reside in /opt/vertica/config and provides details about each backup.
Returns a list of all backups created for vbr configuration (*.ini) files that reside in /opt/vertica/config
and provides details about each backup.
Resource URL
https://<NODE>:5444/backups
The API key must have restricted level security or higher.
Parameters
None.
Example request
GET |
https://<NODE>:5444/backups |
Response:
{
"data": [
{
"backups": [
{
"archive_id": "v_vdb_bk_snapshot_20190305_174428",
"version": "v9.2.1-20190305",
"href": "/backups/fullbk/v_vdb_bk_snapshot_20190305_174428",
"exclude_patterns": "",
"backup_type": "full",
"include_patterns": "",
"epoch": "16",
"objects": "",
"hosts": "v_vdb_bk_node0001(10.20.91.240), v_vdb_bk_node0002(10.20.91.241), v_vdb_bk_node0003(10.20.91.242), v_vdb_bk_node0004(10.20.91.243), v_vdb_bk_node0005(10.20.91.244)"
},
{
"archive_id": "v_vdb_bk_snapshot_20190305_174025",
"version": "v9.2.1-20190305",
"href": "/backups/fullbk/v_vdb_bk_snapshot_20190305_174025",
"exclude_patterns": "",
"backup_type": "full",
"include_patterns": "",
"epoch": "16",
"objects": "",
"hosts": "v_vdb_bk_node0001(10.20.91.240), v_vdb_bk_node0002(10.20.91.241), v_vdb_bk_node0003(10.20.91.242), v_vdb_bk_node0004(10.20.91.243), v_vdb_bk_node0005(10.20.91.244)"
}
],
"config_file": "/opt/vertica/config/fullbk.ini",
"config_script_base": "fullbk",
"num_backups": 2
}
],
"href": "/backups",
"mime-type": "application/vertica.databases.json-v2"
}
2 - POST backups/:config_script_base
Creates a new backup job for the backup defined in the vbr configuration script :config_script_base.
Creates a new backup job for the backup defined in the vbr configuration script :config_script_base
. The vbr configuration script must reside in /opt/vertica/configuration
. The :config_script_base
value does not include the .ini filename extention.
To determine valid :config_script_base
values, see GET backups.
Returns a job ID that you can use to determine the status of the job.
Resource URL
https://<NODE>:5444/backups/:config_script_base
The API key must have restricted level security or higher.
Parameters
None.
Example request
POST |
https://<NODE>:5444/backups/backup3 |
Response:
{
"id": "CreateBackup-VMart-1404750602.03",
"url": "/jobs/CreateBackup-VMart-1404750602.03"
}
3 - GET backups/:config_script_base/:archive_id
Returns details on a specific backup.
Returns details on a specific backup. You must provide the :config_script_base
. This value is the name of a vbr config file (without the .ini filename extension) that resides in /opt/vertica/config
. The :archive_id
is the value of the backup field that the GET backups command returns.
Resource URL
https://<NODE>:5444/backups/:config_script_base/:archive_id
The API key must have restricted level security or higher.
Parameters
None.
Example request
GET |
https://<NODE>:5444/backups/fullbk/v_vdb_bk_snapshot_20190304_204814 |
Response:
{
"archive_id": "v_vdb_bk_snapshot_20190304_204814",
"config_file": "/opt/vertica/config/fullbk.ini",
"objects": "",
"href": "/backups/fullbk/v_vdb_bk_snapshot_20190304_204814",
"exclude_patterns": "",
"epoch": "16",
"include_patterns": "",
"backup_type": "full",
"version": "v9.2.1-20190304",
"hosts": "v_vdb_bk_node0001(10.20.91.240),
v_vdb_bk_node0002(10.20.91.241),
v_vdb_bk_node0003(10.20.91.242),
v_vdb_bk_node0004(10.20.91.243),
v_vdb_bk_node0005(10.20.91.244)"
}
4 - POST restore/:archive_id
Creates a new restore job to restore the database from the backup archive identified by :archive_id.
Creates a new restore job to restore the database from the backup archive identified by :archive_id
. The :archive_id
is the value of a backup field that the GET backups command returns.
Returns a job ID that you can use to determine the status of the job. See GET jobs.
Resource URL
https://<NODE>:5444/restore/:archive_id
The API key must have restricted level security or higher.
Parameters
None.
Example request
POST |
https://<NODE>:5444/restore/backup3_20140707_132904 |
Response:
{
"id": "RestoreBackup-VMart-1404760113.71",
"url": "/jobs/RestoreBackup-VMart-1404760113.71"
}