backup 4.1.2 → 4.1.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: 151aecea39f87544f12a1633925f1c0fd641cdea
4
- data.tar.gz: 17878e947255e0844f88eb1051f0bfa449ba13b2
3
+ metadata.gz: aa0b144330dcad2a6b8431298f2b67f74a7ef5ea
4
+ data.tar.gz: 45e786c86125a2a83620f3ba17c73adb6d144ec0
5
5
  SHA512:
6
- metadata.gz: 1882c8c062df734ddd52988c1e28af95c2ec0411c279e8e563e501b5c39ad801bb82152e7d2275df416693f9c433b54a7a2995e6d25f4f3ae91dfe0c38525e90
7
- data.tar.gz: eeae4c0cf599fa6622141dc73e4f12d9f2b79a4046440a1c2c067f99614cc72a792ab9938e82a9be5669dc4a680ef35a8494ef4047f7b29f5355897879ef620f
6
+ metadata.gz: fc0d62798b5de148dcd56980645875d423fceea53350657f532f7bd5499ae9bd7ee561d691a7a4a4bc7482ff691f94adc776c1f81aaf4f28abded8b5607e71d7
7
+ data.tar.gz: 4fed7271602ac403689a93665390d775e059c8d5758346752b35b4002bec1f05f9175704d0d5602c56f4f08b7346a8c72c33f57302dfe2820c9ce049c2c2f6d8
@@ -46,6 +46,12 @@ module Backup
46
46
  # See: http://www.percona.com/doc/percona-xtrabackup/
47
47
  attr_accessor :backup_engine
48
48
 
49
+ ##
50
+ # If true (which is the default behaviour), the backup will be prepared
51
+ # after it has been successfuly created. This option is only valid if
52
+ # :backup_engine is set to :innobackupex.
53
+ attr_accessor :prepare_backup
54
+
49
55
  ##
50
56
  # If set the backup engine command block is executed as the given user
51
57
  attr_accessor :sudo_user
@@ -60,6 +66,7 @@ module Backup
60
66
 
61
67
  @name ||= :all
62
68
  @backup_engine ||= :mysqldump
69
+ @prepare_backup = true if @prepare_backup.nil?
63
70
  end
64
71
 
65
72
  ##
@@ -151,14 +158,19 @@ module Backup
151
158
  "#{ utility(:innobackupex) } #{ credential_options } " +
152
159
  "#{ connectivity_options } #{ user_options } " +
153
160
  "--no-timestamp #{ temp_dir } #{ quiet_option } && " +
154
- # Log applying phase (prepare for restore)
155
- "#{ utility(:innobackupex) } --apply-log #{ temp_dir } " +
156
- "#{ user_prepare_options } #{ quiet_option } && " +
161
+ innobackupex_prepare +
157
162
  # Move files to tar-ed stream on stdout
158
163
  "#{ utility(:tar) } --remove-files -cf - " +
159
164
  "-C #{ File.dirname(temp_dir) } #{ File.basename(temp_dir) }"
160
165
  end
161
166
 
167
+ def innobackupex_prepare
168
+ return "" unless @prepare_backup
169
+ # Log applying phase (prepare for restore)
170
+ "#{ utility(:innobackupex) } --apply-log #{ temp_dir } " +
171
+ "#{ user_prepare_options } #{ quiet_option } && "
172
+ end
173
+
162
174
  def sudo_option(command_block)
163
175
  return command_block unless sudo_user
164
176
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Backup
4
- VERSION = '4.1.2'
4
+ VERSION = '4.1.3'
5
5
  end
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.1.2
4
+ version: 4.1.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: 2014-10-13 00:00:00.000000000 Z
11
+ date: 2014-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable