Mergify Enterprise
ArchitectureRequirementsInstallationManual Installation (Legacy)Advanced FeaturesTroubleshootingMaintenanceRelease NotesDeploying Mergify Enterprise in your data center or private cloud environment requires a reliable backup and restore strategy. This ensures that your Mergify configuration and data remain secure and recoverable in the event of a disaster. Mergify Enterprise mainly consists of:
- a Redis database;
- a Docker container with the Mergify application;
- a PostgreSQL (PG) database.
This guide will walk you through backing up these components and restoring them when necessary.
Introduction to Backup and Restore
In any on-premise deployment, preparing for unforeseen issues like data loss or system failures is crucial. For Mergify Enterprise, the focus is on preserving the state and data in the PostgreSQL database. Redis, being a transient store, and the Docker image, which can be re-downloaded, do not typically require backups. However, it's essential to keep track of the Mergify version you're using for a smooth restore process.
How to Backup Mergify Enterprise
Backing up your Mergify Enterprise installation involves two main steps: noting your current Docker image version and backing up the PostgreSQL database.
Docker Image Version
- Check the Current Version: Run
docker images
to list the Docker images and their tags. Note down the tag of your Mergify Enterprise image.
PostgreSQL Database Backup
If you are using a managed Postgres database, you can make a snapshot with our cloud provider tooling. For example, on AWS, you can run the following:
aws rds create-db-snapshot --db-instance-identifier [mergify-database-instance] --db-snapshot-identifier mergify-database-2023-11-27-16-19
If you are managing the Postgres database yourself, here is the command to create a full backup:
pg_dump --format=c --no-owner --no-acl -h [host] -U [username] [database_name] > [outputfile.dump]
How to Restore Mergify Enterprise
Restoring Mergify Enterprise involves setting up the Docker container with the noted version and restoring the PostgreSQL database.
PostgreSQL Database Restore
- Prepare the Database: Ensure that the PostgreSQL container is running and accessible.
- Restore the Database: Use the
pg_restore
utility to restore the database from the backup file.
createdb -h [host] -U [username] [database_name]
pg_restore -h [host] -U [username] -d [database_name] [outputfile.dump]
Docker Image
- Pull the Required Version: Use
docker pull
to download the specific version of Mergify Enterprise you noted during the backup process.
docker pull mergify/enterprise:[Your-Version-Tag]
2. Start the Docker Container: Run the Docker container using the downloaded image.
By following these steps, you can ensure that your Mergify Enterprise installation is not only secure but also quickly recoverable in case of any issues. Regular backups and familiarizing yourself with the restore process can significantly reduce downtime and data loss risks.