backup 4.2.2 → 4.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/backup.rb +1 -0
- data/lib/backup/database/mongodb.rb +2 -1
- data/lib/backup/storage/s3.rb +3 -2
- data/lib/backup/syncer/rsync/base.rb +7 -1
- data/lib/backup/version.rb +1 -1
- data/templates/cli/databases/mongodb +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: 5add3999b96619c0b921169ed52e635cf4b61c56
|
4
|
+
data.tar.gz: 72f1c297b011a1487bc2ddb46f31cb9ce94afad6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 605f7883e601a0f2552fc4db82948642ab3f839219bb671141aae99099fe8eccd51805322cfd8377d9860783f3cd4c325f04789217ab77a3e88ee19800a0ebe4
|
7
|
+
data.tar.gz: 10b798e65ca1c71ebf4d17be9f8b8ea56de44ed801c11b71d57864c96512ff3d1d7092bb41c87c4eca43c590d3552e73afd8dbb3d9410eff814431e3af31795c
|
data/lib/backup.rb
CHANGED
@@ -11,7 +11,7 @@ module Backup
|
|
11
11
|
|
12
12
|
##
|
13
13
|
# Credentials for the specified database
|
14
|
-
attr_accessor :username, :password
|
14
|
+
attr_accessor :username, :password, :authdb
|
15
15
|
|
16
16
|
##
|
17
17
|
# Connectivity options
|
@@ -132,6 +132,7 @@ module Backup
|
|
132
132
|
opts = []
|
133
133
|
opts << "--username='#{ username }'" if username
|
134
134
|
opts << "--password='#{ password }'" if password
|
135
|
+
opts << "--authenticationDatabase='#{ authdb }'" if authdb
|
135
136
|
opts.join(' ')
|
136
137
|
end
|
137
138
|
|
data/lib/backup/storage/s3.rb
CHANGED
@@ -58,6 +58,7 @@ module Backup
|
|
58
58
|
# Supported values:
|
59
59
|
#
|
60
60
|
# - :standard (default)
|
61
|
+
# - :standard_ia
|
61
62
|
# - :reduced_redundancy
|
62
63
|
#
|
63
64
|
# Default: :standard
|
@@ -143,10 +144,10 @@ module Backup
|
|
143
144
|
#encryption must be :aes256 or nil
|
144
145
|
EOS
|
145
146
|
|
146
|
-
classes = ['STANDARD', 'REDUCED_REDUNDANCY']
|
147
|
+
classes = ['STANDARD', 'STANDARD_IA', 'REDUCED_REDUNDANCY']
|
147
148
|
raise Error, <<-EOS unless classes.include?(storage_class.to_s.upcase)
|
148
149
|
Configuration Error
|
149
|
-
#storage_class must be :standard or :reduced_redundancy
|
150
|
+
#storage_class must be :standard or :standard_ia or :reduced_redundancy
|
150
151
|
EOS
|
151
152
|
end
|
152
153
|
|
@@ -8,12 +8,14 @@ module Backup
|
|
8
8
|
##
|
9
9
|
# Additional String or Array of options for the rsync cli
|
10
10
|
attr_accessor :additional_rsync_options
|
11
|
+
attr_accessor :archive
|
11
12
|
|
12
13
|
def initialize(syncer_id = nil, &block)
|
13
14
|
super
|
14
15
|
instance_eval(&block) if block_given?
|
15
16
|
|
16
17
|
@path ||= '~/backups'
|
18
|
+
@archive = @archive.nil? ? true : @archive
|
17
19
|
end
|
18
20
|
|
19
21
|
private
|
@@ -21,7 +23,7 @@ module Backup
|
|
21
23
|
##
|
22
24
|
# Common base command for Local/Push/Pull
|
23
25
|
def rsync_command
|
24
|
-
utility(:rsync) <<
|
26
|
+
utility(:rsync) << archive_option << mirror_option << exclude_option <<
|
25
27
|
" #{ Array(additional_rsync_options).join(' ') }".rstrip
|
26
28
|
end
|
27
29
|
|
@@ -29,6 +31,10 @@ module Backup
|
|
29
31
|
mirror ? ' --delete' : ''
|
30
32
|
end
|
31
33
|
|
34
|
+
def archive_option
|
35
|
+
archive ? ' --archive' : ''
|
36
|
+
end
|
37
|
+
|
32
38
|
def exclude_option
|
33
39
|
excludes.map {|pattern| " --exclude='#{ pattern }'" }.join
|
34
40
|
end
|
data/lib/backup/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van Rooijen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: CFPropertyList
|
@@ -1042,7 +1042,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1042
1042
|
version: '0'
|
1043
1043
|
requirements: []
|
1044
1044
|
rubyforge_project:
|
1045
|
-
rubygems_version: 2.
|
1045
|
+
rubygems_version: 2.5.1
|
1046
1046
|
signing_key:
|
1047
1047
|
specification_version: 4
|
1048
1048
|
summary: Provides an elegant DSL in Ruby for performing backups on UNIX-like systems.
|