Have a question? Want to report an issue? Contact JFrog support

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

Replicating MongoDB

JFrog Distribution uses a MongoDB instance for data persistence. When setting up DR for JFrog Distribution, the MongoDB is replicated to a hidden MongoDB node in the same cluster (the node should be hidden so that it doesn't respond with latency to application requests). We recommend that the replication be performed with low latency and that the hidden node is established in a different region.

In the event that the master Distribution service goes down, a new Distribution service can be installed on the DR recovery machine and connected to the replicated MongoDB node as described in the sections below.


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. You will need to provide a connection string to replicated MongoDB node
    2. You will need to 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 & distributor.local.config.yml file 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 & distributor.local.config.yml file from the new installation.

  4. Start 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 & 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. You will need to provide a connection string to replicated MongoDB node
    2. You will need to 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 & distributor.local.config.yml file from the new installation.

  3. Start the new JFrog Distribution installation 

 

  • No labels