Add Backup Resource

To add a backup resource, use the following request: 

POST /settings/backups/resources.xml
POST /settings/backups/resources.json

XML Request Example

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://onapp.test/settings/backups/resources.xml -d '<resource><label>resource_label</label><enabled>true</enabled><plugin>backup_plugin_label</plugin><primary_host>1.1.1.1</primary_host><secondary_host>2.2.2.2</secondary_host><username>username</username><password>password</password><resource_zone_id type="integer">1</resource_zone_id></resource>'

JSON Request Example

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://onapp.test/settings/backups/resources.json -d '{"resource":{"label":"resource_label","enabled":"true","plugin":"plugin_label","primary_host":"1.1.1.1","secondary_host":"2.2.2.2","username":"username","password":"password","resource_zone_id":1}}'


Where: 

resource - the array of parameters for the backup resource

label* - the label of the backup resource

enabled - set true to enable the backup resource, otherwise, false

plugin* - the label of the backup plugin 

primary_host* - the primary address (either hostname or IP address) used to connect to the third-party backup system

secondary_host - the secondary address (either hostname or IP address) used to connect to the third-party backup system

username* - the username used to connect to the third-party backup system

password* - the password used to connect to the third-party backup system

resource_zone_id* - the ID of the backup resource zone to assign the backup resource to