Did you know there’s a way to automate the backup of your openshift apps?
I didn’t until I found it on the main OpenShift blogs.
Turns out there’s a whole webapp that does it beautifully and it takes 3 simple steps to setup a scheduled backup for your application.
1. Deploy the Openshift Backup server
To deploy it you only have to follow this link.
If logged onto OpenShift it will redirect you to a page to create a new app starting from the Backup Server cartridge

Be sure to be on the bronze plan at least to avoid the gear idling (or the cron job won’t run).
The public url is the url you’ll use to access the OpenShift Backup Server.
Once finished, you’ll have a summary page with an admin/password.
Take note of the user/password, that’s needed to get into the app.

2. Add the Backup Server Cartridge to your Application
Now that you have the backup application ready we need to link our current app (the one we want to backup), to the backup system itself.
To do this we’ll have to add the OpenShift Backup Server Cartridge to our app.
Use the rhc tools with this command
rhc cartridge add -a <app> -c https://raw.githubusercontent.com/wshearn/openshift-cartridge-osbs-client/master/metadata/manifest.yml
3. Configure the Backup Server to do Backups
Now that everything is setup, go to the public url of the backup server and use the username/password you’ve received before.
Once in the admin click “Gear List” in the top and then click “Manage” near the app you’ve just linked.
There you’ll have the option to schedule daily/weekly/monthly backup and to do a backup right away.

That’s it.
I didn’t expect it to be so simple.
The interface can be improved but for something like a backup that’s ok 😉
Leave a Reply