Backup and recovery

In this recipe, we look into backing up and restoring Orchestrator. To back up and restore single packages or workflows, please see the Importing and exporting Orchestrator elements and Working with packages recipes in Chapter 4, Programming Skills.

Getting ready

We need an installed and running Orchestrator server.

How to do it...

There are several things that should be backed up; we will have a look at all of them.

Tip

A snapshot is not a backup.

Backing up Orchestrator configuration

This is a one off job. You only need to do it when you change the Orchestrator configuration:

  1. Open the Orchestrator Control Center.
  2. Click on Export/Import Configuration and then on Export Configuration.
  3. Select all the checkboxes.
  4. Depending on your security needs, assign a Password to the export.
  5. Click on Export.
  6. Place the file in a secure location where you can easily retrieve it in the case of a restore.

    Backing up Orchestrator configuration

Backing up an internal database

The backup of an external database is done with the normal enterprise methods. The internal Orchestrator PostgreSQL DB is a different thing:

  1. Connect to your Orchestrator OS via SSH.
  2. Run the following command to backup the Orchestrator DB:
          pg_dump vmware -U vmware -Fp -c | gzip -c > vRO-DB.gz 
    
  3. Save the dump in a place where you can find it again. Please also see the There's more... section of this recipe.

    Tip

    The Control Center database export uses the same method and both files are compatible.

Restore

Assuming that your Orchestrator installation died and you need to restore it, follow these steps:

  1. Deploy a fresh Orchestrator appliance of the same version you lost.
  2. Open the Orchestrator Control Center.
  3. Stop the Orchestrator service.
  4. Click on Export/Import Configuration and then on Import Configuration.
  5. Browse to the Orchestrator backup file.
  6. You may need to enter a Password.
  7. Click on Import.

    Note

    If you are using an external DB, that's it, you're done, just start the Orchestrator service again. If you are using the internal database, continue below.

  8. Click on Home and then go to Import Database.
  9. Browse to the exported database file.
  10. Click Import database.
  11. Select the item you want to import (for a full restore, tick everything).

    Restore

  12. Click on Finish Import.
  13. Start the Orchestrator service.

How it works...

The Control Center configuration export helps quite a bit with preserving your Orchestrator configurations; however, it's not perfect. The best protection against any loss is solid documentation, where you write down the Orchestrator configurations, as well as why an item is configured the way it is.

External database

Using an external database for Orchestrator has the immense advantage that this database can be backed up using the already-existing methods of your business. The Orchestrator database contains most parts of the configuration, but more importantly, it contains all workflows and workflow executions. Having a regular database backup is important.

If one restores the database, it's important to stop the Orchestrator server first.

There's more...

The continued backup of the internal Orchestrator PostgreSQL database can be done with quite a lot of methods. Here we will discuss some of them.

Cron job

The idea is to use the internal Linux scheduler (called CRON) to facilitate the backup. You need access to the Orchestrator OS as well as to a shared drive. There is a nice article that goes into this in more detail:

https://communities.vmware.com/docs/DOC-24026

vRO policy

Using Orchestrator Policies, it is possible to create re-occurring tasks. We can use this to create a workflow that will back up the Orchestrator database either to a shared drive or send the export via a mail attachment.

See the recipe Working with policies in Chapter 8, Better Workflows and Optimized Working and the recipes Working with mails and File operations in Chapter 9, Essential Plugins.

vRO Control Center API

The Control Center has an API that is REST and can be accessed. We have a short look at it in the recipe Control Center titbits in this chapter and a more detailed look in the recipe Accessing the Control Center via REST plugin in Chapter 7, Interacting with Orchestrator. You could use the REST to connect to the Control Center and then export the database this way.

See also

The recipe Working with packages in Chapter 4, Programming Skills, shows you how to back up elements in Orchestrator.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset