Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

Taking and restoring application backups


In the real world, things can go wrong at any time, and you should always have a backup of your entire application that you can apply to restore the application to a happy state. An OpenShift application consists of a Git repository, one or more databases, environment variables, and a persistent data directory you should make a backup of. You can make database backups using command-line tools, such as mysqldump, pg_dump, and mongoexport, but those only make backups of the respective databases. We will cover database backups in later chapters. In this recipe, you will learn how to use rhc to make and restore backups.

Getting ready

In order to prepare yourself for this recipe, you will need rhc installed on your machine. Also, you will need to make use of the application created in the Creating an OpenShift application using the rhc command-line client recipe.

How to do it…

  1. To make a backup of your application, open a command-line terminal and run the following...