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 theStriim/lib
directorybacking 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:
If Striim is not running, start it (see Starting and stopping Striim Platform).
Open a shell terminal, change to the
Striim/bin
directory, and enter this command:./derbyTools.sh backup
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.
Install Striim as described in Running Striim in CentOS or Running Striim in Ubuntu, but do not reboot.
Copy any backed-up .jar files to
striim/lib
.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.)
Reboot the server.
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>
When the script completes, shut down the server.
Restore any persisted WActionStore tables using the usual tools of the DBMS.
If the contents of the
striim/UploadedFiles
directory have been lost, copy them from the backup.Restart the server.