Skip to end of metadata
Go to start of metadata

Overview

The purpose of configuring disaster recovery is to prevent the loss of critical data in the event that your Distribution service experiences an event that causes irreversible damage and loss of data, or if it needs to be taken down gracefully for any other reason (e.g. hardware maintenance on the server machine). While setting up disaster recovery is not required to use JFrog Distribution, we highly recommend it as a best practice to mitigate the potential for damaging events to your JFrog Distribution service.

This page describes how to set up disaster recovery for JFrog Distribution.

Setting up DR for JFrog Artifactory

The contents of this page describe how to set up DR for JFrog Distribution. To set up DR for JFrog Artifactory services, please refer to Disaster Recovery in the JFrog Mission Control User Guide.

Page Contents

JFrog Distribution uses a PostgreSQL instance for data persistence. When configuring DR for JFrog Distribution, we recommend performing one of the following methods to allow Distribution to continue functioning properly:

  • Hot Backup: Use PostgreSQL replication capabilities, to support a standby updated server containing all the critical data. It is recommended to set up the standby node in a different region.
  • Cold Backup: Periodically take snapshots from Postgres containing all the critical data.

In the event that the master Distribution service goes down, a new Distribution service can be installed on the DR recovery machine, and connect to the standby PostgreSQL node as described in the following sections.


DR for a Docker Installation

Implementing DR for a Docker installation of JFrog Distribution involves the following main steps:

  1. Preparing snapshots of the "Home" folders
  2. Starting the DR recovery service

Preparing Snapshots of Home Folders

When installing the Master instance of your JFrog Distribution service, the DISTRIBUTION_MOUNT_ROOT variable is set (this defaults to /home/USER/.jfrog/distribution). You need to keep backup snapshots of the Distribution and Distributor services Home folders: DISTRIBUTION_MOUNT_ROOT/distribution
DISTRIBUTION_MOUNT_ROOT/distributor

Exception

Make sure to exclude distribution.local.config.yml & distributor.local.config.yml from both folders.

Starting the DR Recovery Service

To get the DR recovery service up and running, follow the steps below:

  1. Install a new instance of JFrog Distribution. Make sure to install the same version used on the Master service.
    1. Provide a connection string to replicated PostgreSQL node.
    2. Provide a connection string to a Redis server. If you have not already done so, you will need to install one first.
  2. Replace the DISTRIBUTION_MOUNT_ROOT/distribution folder with the one you backed up from the Master service installation.

    Make sure to keep the distribution.local.config.yml and the distributor.local.config.yml files from the new installation.


  3. Replace the DISTRIBUTION_MOUNT_ROOT/distributor folder with the one you backed up from the Master service installation

    Make sure to keep the distribution.local.config.yml and the distributor.local.config.yml files from the new installation.

  4. Run the new JFrog Distribution installation. 


DR for a Linux Installation

Implementing DR for a Linux installation of JFrog Distribution involves the following main steps:

  1. Preparing a snapshot of the data folder 
  2. Starting the DR recovery service 

Preparing a Snapshot of the Data Folder

When installing the Master instance of your JFrog Distribution service, the Distribution data folder was set (this defaults to /var/opt/jfrog/distribution). You need to keep a backup snapshot of this folder.

Exception

Make sure to exclude distribution.local.config.yml and the distributor.local.config.yml from the folder.

Starting the DR Recovery Service

To get the DR recovery service up and running, follow the steps below:

  1. Install a new instance of JFrog Distribution. Make sure to install the same version used on the Master service. 

    1. Provide a connection string to replicated PostgreSQL node.

    2. Provide a connection string to a Redis server. If you have not already done so, you will need to install one first.

  2. Replace the Distribution data folder with the one you backed up from the Master service installation.

    Make sure to keep the distribution.local.config.yml and distributor.local.config.yml files from the new installation.

  3. Run the new JFrog Distribution installation. 


  • No labels