pxcbackup 0.2.0 → 0.2.1

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: 4919b371225d61db6d40812129a705252c3df03b
4
- data.tar.gz: b4a720f44e75ae89f902ea2f795c98c8e88d5074
3
+ metadata.gz: bb64134275ba48069e5684884e14f5505e5f0cfb
4
+ data.tar.gz: 1128b8615e5e319cf01a65dd87be7d249bc05304
5
5
  SHA512:
6
- metadata.gz: 2f9daa68cdaeac728543a34133843e26c28bcb98f9f1581e992de4545df87bd1c89d5c659400194335a302c484f547c35561b2685591cb05ed374a300bfa596b
7
- data.tar.gz: 022bccdaf48c27937246ef113f9bd9d478c48ee580a6ea111dd7b40ec13c88860de8aa94de8f052604fbb066cc825ff66b99fdc7083d4a6d3af92950a76aa51e
6
+ metadata.gz: 69f4c9aa76dab8dc17d91ddafb3e5d4318e34ff0ad17d8bc219e382e027ddd0c97efebed601b68daac960b7019d25c658e4e3a76f965938a3f8556daa134ba04
7
+ data.tar.gz: 325fc5a22b630f6a5ac2267297c8c10e26f5a2eea2db824b97418801598e251b745232b998d6e3be46fde1a4f0634e1087eca3cb7a53c6e2f870ad2603661ab0
data/README.md CHANGED
@@ -54,17 +54,22 @@ compact: false
54
54
  compress: true
55
55
  encrypt: AES256
56
56
  encrypt_key: <secret-key>
57
- retention: 100
58
57
  desync_wait: 30
59
58
  threads: 4
60
59
  memory: 1G
60
+ retention:
61
+ - match: *
62
+ expire: 1w
63
+ - match: %k = 0
64
+ expire: 1m
65
+ - match: %u = 1
66
+ expire: 1y
67
+ - match: %e > 7
68
+ expire: 5y
61
69
  ```
62
70
 
63
71
  ## Wishlist
64
72
 
65
- * More complex rotation schemes
66
- * Separate rotation scheme for remote
67
- * Better error handling for shell commands
68
73
  * Code documentation (RDoc?)
69
74
  * Tests (RSpec?)
70
75
  * Different remote providers
@@ -349,10 +349,16 @@ module PXCBackup
349
349
  Command.run(command)
350
350
  end
351
351
 
352
+ checkpoints_file = File.join(dir, 'xtrabackup_checkpoints')
353
+ unless File.file?(checkpoints_file)
354
+ Logger.warning 'Could not find xtrabackup_checkpoints: trying to skip faulty backup'
355
+ return
356
+ end
357
+
352
358
  xtrabackup_binary_file = File.join(dir, 'xtrabackup_binary')
353
359
  File.delete(xtrabackup_binary_file) if File.file?(xtrabackup_binary_file)
354
360
 
355
- info = read_backup_info(File.join(dir, 'xtrabackup_checkpoints'))
361
+ info = read_backup_info(checkpoints_file)
356
362
  info[:compress] = Dir.glob(File.join(dir, '**', '*.qp')).any?
357
363
 
358
364
  yield(dir, info)
@@ -53,6 +53,10 @@ module PXCBackup
53
53
  output message if @verbosity_level >= 1
54
54
  end
55
55
 
56
+ def self.warning(message)
57
+ output yellow(message) if @verbosity_level >= 1
58
+ end
59
+
56
60
  def self.debug(message)
57
61
  output blue(message) if @verbosity_level >= 2
58
62
  end
@@ -1,3 +1,3 @@
1
1
  module PXCBackup
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pxcbackup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robbert Klarenbeek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-14 00:00:00.000000000 Z
11
+ date: 2014-08-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Backup tool for Percona XtraDB Cluster
14
14
  email: robbertkl@renbeek.nl