mongo-oplog-backup 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/bin/mongo-oplog-backup +5 -1
- data/lib/mongo_oplog_backup/config.rb +4 -1
- data/lib/mongo_oplog_backup/ext/timestamp.rb +1 -0
- data/lib/mongo_oplog_backup/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fd77128ff3c7a9fea813efd8fdb04197c7cb42b
|
4
|
+
data.tar.gz: 644387bdbdf649dca6527d7e1a0636043f1e3aee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23665952e8feafd8ef03cdb792b59e07d067a516e1234f64c38884bcfa074563b9a53f0a84adac0e072b912d803b1434272fcf732b6628dfb3901f26ed28233b
|
7
|
+
data.tar.gz: 66147160a921815228d5333621e2a082f18653f998014e84a75d2a122b9896cc30c9f9307f1a49fafaed1c517070953617157aae8e949809eee6a336d679a2f5
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.2
|
data/.travis.yml
CHANGED
data/bin/mongo-oplog-backup
CHANGED
@@ -15,6 +15,8 @@ opts = Slop.parse(help: true, strict: true) do
|
|
15
15
|
|
16
16
|
on :f, :file, 'Configuration file for common defaults', argument: :required
|
17
17
|
on :ssl, "Connect to a mongod instance over an SSL connection"
|
18
|
+
on :sslAllowInvalidCertificates, "Allow connections to a mongod instance with an invalid certificate"
|
19
|
+
on :sslCAFile, "Specifies a Certificate Authority file for validating the SSL certificate provided by the mongod instance.", argument: :required
|
18
20
|
on :host, "Specifies a resolvable hostname for the mongod that you wish to backup.", default: 'localhost', argument: :required
|
19
21
|
on :port, "Specifies the port that mongod is running on", default: '27017', argument: :required
|
20
22
|
on :u, :username, "Specifies a username to authenticate to the MongoDB instance, if your database requires authentication. Use in conjunction with the --password option to supply a password.", argument: :required
|
@@ -24,13 +26,15 @@ opts = Slop.parse(help: true, strict: true) do
|
|
24
26
|
dir = opts[:dir] || 'backup'
|
25
27
|
config_opts = {
|
26
28
|
dir: dir,
|
27
|
-
ssl: opts.ssl
|
29
|
+
ssl: opts.ssl?,
|
30
|
+
sslAllowInvalidCertificates: opts.sslAllowInvalidCertificates?
|
28
31
|
}
|
29
32
|
config_opts[:file] = opts[:file]
|
30
33
|
config_opts[:host] = opts[:host]
|
31
34
|
config_opts[:port] = opts[:port]
|
32
35
|
config_opts[:username] = opts[:username]
|
33
36
|
config_opts[:password] = opts[:password]
|
37
|
+
config_opts[:sslCAFile] = opts[:sslCAFile]
|
34
38
|
|
35
39
|
mode = :auto
|
36
40
|
if opts.full?
|
@@ -15,6 +15,8 @@ module MongoOplogBackup
|
|
15
15
|
unless file.nil?
|
16
16
|
conf = YAML.load_file(file)
|
17
17
|
options[:ssl] = conf["ssl"] unless conf["ssl"].nil?
|
18
|
+
options[:sslAllowInvalidCertificates] = conf["sslAllowInvalidCertificates"] unless conf["sslAllowInvalidCertificates"].nil?
|
19
|
+
options[:sslCAFile] = conf["sslCAFile"] unless conf["sslCAFile"].nil?
|
18
20
|
options[:host] = conf["host"] unless conf["host"].nil?
|
19
21
|
options[:port] = conf["port"].to_s unless conf["port"].nil?
|
20
22
|
options[:username] = conf["username"] unless conf["username"].nil?
|
@@ -31,7 +33,8 @@ module MongoOplogBackup
|
|
31
33
|
def command_line_options
|
32
34
|
args = []
|
33
35
|
args << '--ssl' if options[:ssl]
|
34
|
-
|
36
|
+
args << '--sslAllowInvalidCertificates' if options[:sslAllowInvalidCertificates]
|
37
|
+
[:host, :port, :username, :password, :sslCAFile].each do |option|
|
35
38
|
args += ["--#{option}", options[option].strip] if options[option]
|
36
39
|
end
|
37
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo-oplog-backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ralf Kistner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bson
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.4.5.1
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Incremental backups for MongoDB using the oplog.
|