Skip to content

Commit efa823e

Browse files
Merge pull request #96 from timvaillancourt/MCB_1.0-docupdate-v1
Mcb 1.0 docupdate v1
2 parents f85eced + f50a95d commit efa823e

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

README.rst

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Requirements:
3737

3838
- Backup consistency depends on consistent server time across all
3939
hosts. Server time **must be synchronized on all nodes** using ntpd
40-
and a consistent time source
40+
and a consistent time source or virtualization guest agent that
41+
syncs time
4142
- Must have 'mongodump' installed and specified if not at default:
4243
*/usr/bin/mongodump*. Even if you do not run MongoDB 3.2+, it is
4344
strongly recommended to use MongoDB 3.2+ binaries due to inline
@@ -89,6 +90,8 @@ User and password are set using the 'user' and 'password' config-file fields or
8990
Run a Backup
9091
~~~~~~~~~~~~
9192

93+
**Using Command-Line Flags**
94+
9295
::
9396

9497
$ mongodb-consistent-backup -H mongos1.example.com -P 27018 -u mongodb-consistent-backup -p s3cr3t -n prodwebsite -l /opt/mongobackups
@@ -97,21 +100,49 @@ Run a Backup
97100
$ ls /opt/mongobackups
98101
prodwebsite
99102

103+
**Using a Config File**
104+
105+
::
106+
107+
$ mongodb-consistent-backup --config /etc/mongodb-consistent-backup.yml
108+
...
109+
100110
Restore a Backup
101111
~~~~~~~~~~~~~~~~
102112

113+
The backups are mongorestore compatible. The *--oplogReplay* flag **MUST** be present to replay the oplogs to ensure consistency.
114+
103115
::
104116

105117
$ tar xfvz <shardname>.tar.gz
106118
...
107-
$ mongorestore --host mongod12.example.com --port 27017 -u admin -p 123456 --oplogReplay /path/to/backup
119+
$ mongorestore --host mongod12.example.com --port 27017 -u admin -p 123456 --oplogReplay --dir /path/to/backup/dump
120+
121+
Run as Docker Container (Experimental)
122+
~~~~~~~~~~~~~~~~~~~~~~~
123+
124+
*Note: you need to use persistent volumes to store backups long-term on disk when using Docker. Data in Docker containers is destroyed when the container is deleted.*
125+
126+
**Via Docker Hub**
127+
128+
::
129+
130+
$ docker run -i timvaillancourt/mongodb_consistent_backup <mongodb_consistent_backup-flags>
131+
132+
**Build and Run Docker Image**
133+
134+
::
135+
136+
$ cd /path/to/mongodb_consistent_backup
137+
$ make docker
138+
$ docker run -t mongodb_consistent_backup <mongodb_consistent_backup-flags>
108139

109140
Roadmap
110141
~~~~~~~
111142

112-
- "Distributed Mode" for running/storing backup on remote hosts (*via
113-
ssh + magic*)
114-
- Single collection and/or database backup feature
143+
- "Distributed Mode" for running backup on remote hosts *(vs. only on one host)*
144+
- Support more notification methods *(Prometheus, PagerDuty, etc)* and upload methods *(Google Cloud Storage, Rsync, etc)*
145+
- Support SSL MongoDB connections
115146
- Unit tests
116147

117148
Contact

0 commit comments

Comments
 (0)