The Backup feature in the developer console for creating backups is great. I would however like the possibility to automate this. Is there a way to do so from the cf command line app?
Thanks
It's not possible from the cf cli
, but there's an API endpoint for triggering backups.
API Docs | Custom Extensions | Swisscom Application Cloud Filter for Cloud Foundry (CF) Cloud Controller (CC) API. Implements Swisscom proprietary extensions
POST /custom/service_instances/{service-instance-id}/backups
Creates a backup for a given service instance
See for more Info Service Backup and Restore in docs.developer.swisscom.com
Create Backup To create a backup, navigate to the service instance in the web console and then to the “Backups” tab. There you can click the “Create” button to trigger a manual backup.
Note: Backups have to be triggered manually from the web console.
Be aware that you can only keep a set number of backups per service instance. The actual number is dependent on the service type and service plan. In case you already have the maximum number, you cannot create any new backups before deleting one of the existing.
It may take several minutes to backup your service (depending on the size of your service instance).
Restore Backup You can restore any backup at any time. The current state of your backup will be overwritten and replaced with the state saved to the backup. You are advised to create a backup of the current state before restoring an old state.
Limitations You can only perform one backup or restore action per service instance at a time. If an action is still ongoing, you cannot trigger another one. You cannot exceed the maxmimum number of backups per service instance