Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Configuring Replication - Mongo DB

RSS
Modified on Wed, Jul 13, 2016, 2:45 PM by Administrator Categorized as Mongo DB

Overview

This article explains how to configure replication for Mongo DB.

Procedure

Enable Replication

1. Edit /etc/mongod.conf: add the following lines

replication:
  replSetName: rsProd
  oplogSizeMB: 200

2. On the Primary server only

mongo

Then in the Mongo shell

rs.add("host-name:27017")
. . .
rs.initiate()

Disable Replication

1. On the Primary server only

mongo

2. For each host name in the replica set, within the Mongo shell, type the following command.

rs.remove("host-name:27017")

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2018, Patrick Jasinski.