How to Automatically Backup your OpenShift Applications with the Openshift Backup Server

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

Create new openshift backup server application
Create new openshift backup server application

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.

Openshift backup server summary page
Summary page with user/pass

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.

Openshift backup server
Here you can activate the weekly/monthly/daily backups

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 😉

One response to “How to Automatically Backup your OpenShift Applications with the Openshift Backup Server”

  1. […] How to Automatically Backup your OpenShift Applications with the Openshift Backup Server […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: