Edit Auto-backup Preset

To edit an auto-backup preset, use the following method:

PUT /settings/autobackup_presets/:id.xml
PUT /settings/autobackup_presets/:id.json

XML Request Example

curl -i -X PUT -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d'<?xml version="1.0" encoding="UTF-8"?><autobackup_template><duration>5</duration><period>days</period><enabled>false</enabled><rotation_period>1</rotation_period></autobackup_template>' --url http://onapp.test/settings/autobackup_presets/:id.xml'

JSON Request Example

curl -i -X PUT -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d'{"autobackup_template":{"duration":"5","period":"weeks","enabled": "false","rotation_period":"1"}}' --url http://onapp.test/settings/autobackup_presets/:id.json'

You can edit the following parameters:

duration - edit the number specifying how often a backup should be taken

enabled - set true if auto-backup preset is enabled, otherwise set false

rotation_period - the number of backups to keep before deleting the initial backup

Every autobackup_preset_id has its defined period (either days, or weeks, or months, or years), which cannot be edited.

Returns HTTP 204 response on success, or HTTP 404 when an auto-backup preset with the ID specified is not found, or the URL requested is incorrect.