Mongo: create ReplicaSet

rsync -avP /var/lib/mongo slave.server:/var/lib/mongo/
add to /etc/mongod.conf (on both hosts):
replSet=TestSet

Launch mongodb on both hosts ( Ubuntu: service mongod start )
run mongo client on primary host
initiate master
rs.initiate ()
add slave
rs.add («ip.of.slave.server»)
show config
rs.conf ()