Backup guide

Backup your Bugsnag On-premise installation.

Backing up

Bugsnag should be regularly backed up to ensure you are able to quickly recover in the event of a disaster. To correctly backup a Bugsnag cluster, you need to backup both the data directories on each machine in the cluster and the cluster configuration. Strategies for each are outlined below.

Backing up the data directory

If you are using a cloud provider (like AWS) and your data directory is stored on EBS or an equivalent persistent disk, you can use the snapshot function to take a point in time snapshot of the data directory. If you are not using a cloud provider, but you are using an LVM or some other file system that supports snapshots (ZFS) then it is possible that you can still take a point in time snapshot. This is the recommended way of backing up your data directory as there is no downtime for your installation.

Copying the data directory

If you stop Bugsnag via the Replicated management console you can use the unix command cp to copy the data directory into a resilient backup area. For example,

cp -r /data /backups/

You can then start Bugsnag using the Replicated management console.

It is important to stop the running instance so that the files in the data directory are consistent when making this backup.

Cluster configuration

You must also make a copy of your configuration, as it has randomly generated encryption keys which are used to secure data in your installation. If you do not back this information up, then your installation will be rendered useless if these keys are lost.

To backup the configuration, you can use the replicated cli to export the configuration to a file in a safe place away from the machine Bugsnag is being run on.

replicatedctl app-config view | jq -MS '[ .[] | reduce .Items[] as $i ({}; .[$i.Name] = if ($i.Value | length) > 0 then { value: $i.Value } else {} end) ] | add' > /backups/config.json

This command requires jq, see this page on details for installing on your operating system.

Restoring from backup

To restore from a backup, copy the data from your backup area to the machine. Then import your settings by running the following:

replicatedctl app-config import < /backups/config.json

Finally start Bugsnag via the Replicated management console and you are all done! Please get in touch with us via if you have any issues running a restore.