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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d08d993d32d7569046700f059019d19276be8d4f
4
- data.tar.gz: a0f8b82c36a16137008774c5107c03f2cb560488
3
+ metadata.gz: 5add3999b96619c0b921169ed52e635cf4b61c56
4
+ data.tar.gz: 72f1c297b011a1487bc2ddb46f31cb9ce94afad6
5
5
  SHA512:
6
- metadata.gz: 3bd3300ce800e95d11097dcf02c79965917d9aac7bb58a89e482248a6f3a37084efce66885cfd6b2f8892611b17dd2381df3fdb78c3e052da34e9eb8882b215e
7
- data.tar.gz: dec002458b652dde7ea835c4366581252d1bd1961fca6e125c3677abedf72c03ca90313fa78ca0d8dfc2449575f3542cf399eb98bbdcd8873971f71d57a8fb6c
6
+ metadata.gz: 605f7883e601a0f2552fc4db82948642ab3f839219bb671141aae99099fe8eccd51805322cfd8377d9860783f3cd4c325f04789217ab77a3e88ee19800a0ebe4
7
+ data.tar.gz: 10b798e65ca1c71ebf4d17be9f8b8ea56de44ed801c11b71d57864c96512ff3d1d7092bb41c87c4eca43c590d3552e73afd8dbb3d9410eff814431e3af31795c
@@ -1,6 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  # Load Ruby Core Libraries
4
+ require 'time'
4
5
  require 'fileutils'
5
6
  require 'tempfile'
6
7
  require 'syslog'
@@ -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
 
@@ -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) << ' --archive' << mirror_option << exclude_option <<
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
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Backup
4
- VERSION = '4.2.2'
4
+ VERSION = '4.2.3'
5
5
  end
@@ -6,7 +6,7 @@
6
6
  db.username = "my_username"
7
7
  db.password = "my_password"
8
8
  db.host = "localhost"
9
- db.port = 5432
9
+ db.port = 27017
10
10
  db.ipv6 = false
11
11
  db.only_collections = ["only", "these", "collections"]
12
12
  db.additional_options = []
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.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: 2015-10-10 00:00:00.000000000 Z
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.4.5.1
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.