Snapshot backup and restore

Create snapshots of your TeamForge EventQ program files to restore system after a failure.

The goal of this topic is to help you take "snapshots" of your TeamForge EventQ installation. Snapshots make a copy of all TeamForge EventQ program and configuration files and may be used to restore your system in case of a failure. The snapshot process involves shutting down TeamForge EventQ services, as such, we recommend that a single snapshot of each EventQ host be taken after installation and subsequent upgrades, and periodic database backups be made to restore to a specific (more recent) data set. See the Data back up and restore documentation to create periodic data backups once you've created baseline snapshots.

Note: The TeamForge EventQ hostname cannot be changed when restoring from a snapshot. Please contact support if you need to change the hostname of your TeamForge EventQ service.

Creating snapshots

A snapshot must be taken for each host running TeamForge EventQ services. If all of your TeamForge EventQ services are on a single host, then only one snapshot is required. However, if you've spread services across multiple hosts, then a single snapshot is required per host. The following steps describe making a single snapshot, so you may need to repeat these steps if you have services spread across multiple hosts.

  1. Obtain eventq-snapshot-tools.tar.gz from the App server, located in /opt/collabnet/eventq/tools/
  2. Untar the eventq-snapshot-tools.tar.gz on the target host that you wish to snapshot.
  3. Stop the TeamForge EventQ service(s) running on the target host. See EventQ System Administration.
  4. Run the take_snapshot.sh script with the appropriate argument.

    The take_snapshot.sh script takes one of four arguments (mongodb, rabbitmq, eventq, all). Run the script with the appropriate argument. For instance:

    sudo ./take_snapshot.sh all (single host installation)

    sudo ./take_snapshot.sh mongodb (multi-host, database server only)

    sudo ./take_snapshot.sh rabbitmq (multi-host, message queue server only)

    sudo ./take_snapshot.sh eventq (multi-host, application server only)

    A snapshot will be created and this file should be moved to a safe location (off host). The filename of a snapshot with options 'eventq' or 'all' will include the version number of TeamForge EventQ.

  5. Restart the TeamForge EventQ service(s). See EventQ System Administration.

Restore from a snapshot

  1. Download the disconnected-media package corresponding to your version of EventQ. To obtain a disconnected-media package, see EventQ installation walk-through.

    To restore from a snapshot, you must first download and install the disconnected media RPM package matching your snapshot version number. For instance, if you have a snapshot file labeled 1.0.2, you should download the disconnected media package version 1.0.2.

  2. Install the disconnected-media RPM:

    sudo rpm -ivh collabnet-eventq-disconnected-media-[Version].el6.x86_64.rpm

  3. Run apply_snapshot.sh with the appropriate arguments

    The apply_snapshot.sh script takes two arguments: the snapshot file you wish to apply, and the type of snapshot you wish to apply (mongodb, rabbitmq, eventq, all). Run the script with the appropriate argument. For instance:

    sudo ./apply_snapshot.sh snapshot_file.tar.gz all (single host installation)

    sudo ./apply_snapshot.sh snapshot_file.tar.gz mongodb (multi-host, database server only)

    sudo ./apply_snapshot.sh snapshot_file.tar.gz rabbitmq (multi-host, message queue server only)

    sudo ./apply_snapshot.sh snapshot_file.tar.gz eventq (multi-host, application server only)

  4. Restore desired data backup. See Data back up and restore.
  5. Restart the TeamForge EventQ service(s). See EventQ System Administration.