Skip to main content

Backing up and restoring a cluster

Depending on your configuration, backing up a cluster may have several steps:

  • backing up the metadata repository (always required)

  • backing up any .jar files added to the Striim/lib directory

  • backing up any third-party DBMS tables you are using to persist WActionStores

  • backing up the Elasticsearch data directory

  • backing up the UploadedFiles directory

Backing up the metadata repository host

The Striim metadata repository stores namespace, user, and application data, as well as information used for recovery. It may be hosted on the internal Derby database, Oracle, or PostgreSQL.

If hosted on Oracle or PostgreSQL, use your usual approach for backing it up.

If hosted on Derby:

  1. If Striim is not running, start it (see Starting and stopping Striim Platform).

  2. Open a shell terminal, change to the Striim/bin directory, and enter this command: ./derbyTools.sh backup

  3. When the backup completes, copy the backup directory from Striim/derby/DerbyBackups to a secure location.

Backing up additions to the lib directory

If you have added any database drivers (see Installing third-party drivers in Striim Platform) or Java functions (Using imported Java functions) to the Striim lib directory, it will ease the restore process if you back up copies of the .jar files. It is easy to identify files added to the lib directory as the ones installed with Striim all have the same date.

Backing up third-party DBMS tables

If you are persisting any WActionStores to MySQL or Oracle (as discussed in CREATE WACTIONSTORE), back up the database using the usual tools.

Backing up the Elasticsearch data directory

Copy the striim/elasticsearch\data directory including its subdirectory structure. In Linux, you can do this using cp -r <path>/elasticsearch/data <path>/<backup directory>. In Windows, you can do this using xcopy <path>\elasticsearch\data <path>\<backup directory> /s.

Backing up the UploadedFiles directory

Copy the striim/UploadedFiles directory including its subdirectory structure. In Linux, you can do this using cp -r <path>/UploadedFiles <path>/<backup directory>. In Windows, you can do this using xcopy <path>\UploadedFiles <path>\<backup directory> /s.

Restoring a cluster

The following gives a general idea of how to restore a a cluster. The process may vary depending on your configuration (for example, if you use an external Derby instance) or the problem that led to the need to restore. Contact Striim support if you need assistance.

  1. Install Striim as described in Running Striim in CentOS or Running Striim in Ubuntu, but do not reboot.

  2. Copy any backed-up .jar files to striim/lib.

  3. If necessary, restore the third-party database used to persist WActionStores. (If those tables are intact and recovery is possible, the WActionStores that use them will pick up where they left off.)

  4. Reboot the server.

  5. If the metadata repository is hosted on Oracle or PostgreSQL, restore it using the appropriate tool.

    If the metadata repository is hosted on Derby, copy the backup directory to striim/derby/DerbyBackups, then execute this command to restore the backup: ./derbyTools.sh restore <backup directory name>

  6. When the script completes, shut down the server.

  7. Restore any persisted WActionStore tables using the usual tools of the DBMS.

  8. If the contents of the striim/UploadedFiles directory have been lost, copy them from the backup.

  9. Restart the server.