Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying OPENSHIFT COOKBOOK
  • Table Of Contents Toc
  • Feedback & Rating feedback
OPENSHIFT COOKBOOK

OPENSHIFT COOKBOOK

By : Gulati
3.8 (6)
close
close
OPENSHIFT COOKBOOK

OPENSHIFT COOKBOOK

3.8 (6)
By: Gulati

Overview of this book

If you are a web application developer who wants to use the OpenShift platform to host your next big idea but are looking for guidance on how to achieve this, then this book is the first step you need to take. This is a very accessible cookbook where no previous knowledge of OpenShift is needed.
Table of Contents (14 chapters)
close
close
12
A. Running OpenShift on a Virtual Machine
13
Index

Performing scheduled MongoDB database backups


In this recipe, you will learn how to perform a scheduled backup of your MongoDB database and upload the backup to Amazon S3.

Getting ready

To complete this recipe, you will need an application with a MongoDB cartridge. Refer to the Adding a MongoDB cartridge to your application recipe in this chapter to learn how to install one. Also, you need to have an Amazon AWS account. Go to http://aws.amazon.com/ and sign up for a new account if you don't have one already.

How to do it…

Perform the following steps to enable a daily scheduled backup of the MongoDB cartridge:

  1. Go to https://console.aws.amazon.com/s3/home and create a new bucket to store your database backups.

  2. Add the cron cartridge to your application by running the following command:

    $ rhc cartridge-add cron --app myapp
    
  3. SSH into the application gear and download the s3-bash utility in $OPENSHIFT_DATA_DIR. Extract it to the s3-bash directory using the following commands:

    $ rhc ssh --app myapp
    ...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY