ll-innobackup 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ll-innobackup.rb +4 -3
- metadata +1 -1
data/lib/ll-innobackup.rb
CHANGED
@@ -90,8 +90,9 @@ class InnoBackup
|
|
90
90
|
|
91
91
|
def state(t)
|
92
92
|
state_files[t] ||= JSON.parse(File.read(InnoBackup.state_file(t)))
|
93
|
+
rescue Errno::ENOENT
|
94
|
+
{}
|
93
95
|
rescue JSON::ParserError
|
94
|
-
puts 'unable to stat state file'
|
95
96
|
{}
|
96
97
|
end
|
97
98
|
|
@@ -100,10 +101,8 @@ class InnoBackup
|
|
100
101
|
date = state('full')['date']
|
101
102
|
Time.parse(date).today?
|
102
103
|
rescue Errno::ENOENT
|
103
|
-
puts 'unable to obtain last full backup state'
|
104
104
|
false
|
105
105
|
rescue NoMethodError
|
106
|
-
puts 'unable to obtain last backup state'
|
107
106
|
false
|
108
107
|
end
|
109
108
|
|
@@ -251,6 +250,8 @@ class InnoBackup
|
|
251
250
|
def incremental
|
252
251
|
return unless backup_type == 'incremental'
|
253
252
|
"--incremental --incremental-lsn=#{lsn_from_state}"
|
253
|
+
rescue Errno::ENOENT
|
254
|
+
''
|
254
255
|
end
|
255
256
|
|
256
257
|
def lsn_from_full_backup_state?
|