Back up and restore Hipchat Server

You're pretty savvy, so we probably don't need to explain why you should make backups, but we do need to explain how you make backups and restore Hipchat Server.

The first thing to know is that there are two types of backups:

  • an entire system backup
  • a backup of user data

Entire system backup

If you want to back up all your configurations, settings, files, and–well, everything–then you should make a full virtualization backup. Use your virtual machine’s snapshot capability to back up the entire Hipchat Server. A snapshot captures the state of your entire VM, so all your Hipchat Server data, configuration, and settings will be backed up, and you can easily restore your snapshot.

If you deployed Hipchat Server in AWS you can create a snapshot by shutting down Hipchat Server and creating EBS snapshots of all three volumes. Hipchat Server can then be booted again for continued operation.

It's a good idea to always take a snapshot before upgrading Hipchat Server.

Back up user data only

Backing up Hipchat Server

To back up Hipchat Server, set up a scheduler and export your Hipchat data automatically at regular intervals. You can create your own script (using the export CLI) or use the script we've created to export your data.

See Exporting and Importing your Hipchat Data for details on the CLI and which Hipchat data is and isn't exported.

Note: The exporter also does not export the clients' configuration data, for example, which Hipchat Server host the clients are using.

Script for backing up Hipchat Server

You can use the script we've created to back up Hipchat Server. The script does the following:

  • Creates and downloads a Hipchat Server data export file using an SSH key trust
  • Saves the Hipchat data file to the current directory
  • Appends the passphrase to the hipchat_exports.log (also located in the same directory) in plain text using the format <url>:<passphrase>

It requires access to a client, a Mac, Linux, or Windows PC. The Windows PC needs Cygwin installed, so you can use shell or bash.

  1. Download the script to your client.
  2. Generate an SSH public key on your client, if you don't already have one:
    ssh-keygen
  3. Copy your SSH public key to your Hipchat Server at ~admin/.ssh/authorized_keys
  4. Ensure the permissions on your Hipchat Server are set to user-read only:
    chmod 600 ~admin/.ssh/authorized_keys
  5. Test the SSH key trust:
    ssh admin@hipchat.example.com true
  6. Run the exporter script: 
    SERVER=hipchat.example.com bash hipchat_server_remote_exporter.sh

Scheduling back ups

You can schedule your script to run at regular intervals, so your Hipchat data is backed up automatically. To schedule a job to run your script, you can use cron jobs. See more information on cron jobs for Mac or a Windows PC running Cygwin.

Restoring Hipchat Server

To restore Hipchat Server, deploy, then configure a new Hipchat Server instance.

Import your Hipchat data using the Hipchat import CLI.

Last modified on Nov 30, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.