elastic-backup-2s3 0.1.1 → 0.1.2

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: 5b0edbad64d4b3d88a4b8930ccdc322d095a50a6
4
- data.tar.gz: 7f038e5b440d1869f1ce0a34602b36459de43c9a
3
+ metadata.gz: 77699d024d5d9f82da71fb7c22fcc643216be7ac
4
+ data.tar.gz: 12987b551dad9dccfca651dff0ba584e624c366a
5
5
  SHA512:
6
- metadata.gz: a924475b768ba81d75ac833613fbfbc0373326c0c6f700f4ba0269e2a8ee2a5df029b51550939b85e89009e62c0b06f7b6170fe4c3dae8b4fc44741d30c3102e
7
- data.tar.gz: 70bdd3efbd2983874b57a8cbbd09b9485d9c9466d80c366524531c9213c0de31278e3dedb7aa9796dc011f69c49ba18a1f348a4f404d9c8323eec0ab7eb9e932
6
+ metadata.gz: af3402692b145675cf711e9310f9866ab2d9b4b058f08b16e21a1020b2a170f010ecf32f71d98a4ce760b59e5e11785d802aad3c2cdbdce58e272e80c013633b
7
+ data.tar.gz: e3ae8d1b149427dbaadf93581c8cb6bf9e08740b8fd11628a5ab160f66c83c072b59774dde7a4349bafd0f113419cf3967e6fada2e3d75c8c1107573d6e81d61
data/.semver CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 1
4
+ :patch: 2
5
5
  :special: ''
data/README.org CHANGED
@@ -125,8 +125,9 @@
125
125
  ** Release Notes
126
126
  | Date | Version | Description |
127
127
  |------------+---------+-------------------------------------------------------------------------|
128
- | 2016-04-17 | v0.0.3 | Added a delete snapshot option to allow deletion of a running snapshot. |
128
+ | 2016-05-02 | v0.1.2 | Fixed a couple of minor issues with the restore from shared volume. |
129
129
  | 2016-04-22 | v0.1.0 | Support for FS volume backups added |
130
+ | 2016-04-17 | v0.0.3 | Added a delete snapshot option to allow deletion of a running snapshot. |
130
131
  | | | |
131
132
  ** Known Issues
132
133
  | Date | Version | Description |
data/Rakefile CHANGED
@@ -31,10 +31,8 @@ Juwelier::Tasks.new do |gem|
31
31
  without any fuss or having to dilly around with
32
32
  curl -XPUTS and friends.
33
33
 
34
- So here it is, and I make no apologies about not
35
- supporting the "shared volume" option of Elasticsearch
36
- snapshots. I may add support at a later date. Or
37
- feel free to add it and do a pull request.
34
+ So here it is, and we now support Shared Volumes. See
35
+ the docs on the --fs flag.
38
36
 
39
37
  There are many features I wish to add to this, and
40
38
  if you have any suggestions, please feel free to send
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: elastic-backup-2s3 0.1.1 ruby lib
5
+ # stub: elastic-backup-2s3 0.1.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "elastic-backup-2s3"
9
- s.version = "0.1.1"
9
+ s.version = "0.1.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Fred Mitchell"]
14
14
  s.date = "2016-05-02"
15
- s.description = "\n I simply want to be able to control the backup and\n restoration of the Elasticsearch cluster to S3\n without any fuss or having to dilly around with\n curl -XPUTS and friends.\n\n So here it is, and I make no apologies about not \n supporting the \"shared volume\" option of Elasticsearch\n snapshots. I may add support at a later date. Or\n feel free to add it and do a pull request.\n\n There are many features I wish to add to this, and\n if you have any suggestions, please feel free to send\n them my way!"
15
+ s.description = "\n I simply want to be able to control the backup and\n restoration of the Elasticsearch cluster to S3\n without any fuss or having to dilly around with\n curl -XPUTS and friends.\n\n So here it is, and we now support Shared Volumes. See\n the docs on the --fs flag.\n\n There are many features I wish to add to this, and\n if you have any suggestions, please feel free to send\n them my way!"
16
16
  s.email = "fred.mitchell@gmx.de"
17
17
  s.executables = ["es-snapshot"]
18
18
  s.extra_rdoc_files = [
@@ -37,7 +37,7 @@ module ElasticBackup
37
37
 
38
38
  # Take the s3 url and break it down to
39
39
  # its components [BUCKET, PATH, SNAPSHOT]
40
- def s3url_splice(surl)
40
+ def snapurl_splice(surl)
41
41
  protocol, b, snapshot = surl.split(':')
42
42
  empty, empty, bucket, path = b.split('/', 4)
43
43
  raise "Protocol must be 's3' in #{surl}" unless protocol.downcase == 's3'
@@ -57,8 +57,8 @@ module ElasticBackup
57
57
 
58
58
  # For now, this will overwrite the repo if it is
59
59
  # there already.
60
- def set_repository s3url, opt
61
- bucket, base_path, _ignore = opt[:fs] ? [nil, nil, nil] : s3url_splice(s3url)
60
+ def set_repository snapurl, opt
61
+ bucket, base_path, _ignore = opt[:fs] ? [nil, nil, nil] : snapurl_splice(snapurl)
62
62
  cmd = { repository: opt[:repo],
63
63
  body: unless opt[:fs]
64
64
  {
@@ -85,9 +85,9 @@ module ElasticBackup
85
85
  end
86
86
  end
87
87
 
88
- def initiate_snapshot s3url
89
- _ignore, _ignore, snapname = (opt[:fs] ? [nil, nil, s3url] : s3url_splice(s3url))
90
- raise "Must specify :SNAPSHOTNAME at the end of your S3URL #{s3url}" if snapname.nil?
88
+ def initiate_snapshot snapurl
89
+ _ignore, _ignore, snapname = (opt[:fs] ? [nil, nil, snapurl] : snapurl_splice(snapurl))
90
+ raise "Must specify :SNAPSHOTNAME at the end of your S3URL #{snapurl}" if snapname.nil?
91
91
 
92
92
  cmd = {
93
93
  repository: opt[:repo],
@@ -104,9 +104,9 @@ module ElasticBackup
104
104
  end
105
105
  end
106
106
 
107
- def initiate_restore s3url
108
- _ignore, _ignore, snapname = (opt[:fs] ? [nil, nil, s3url] : s3url_splice(s3url))
109
- raise "Must specify :SNAPSHOTNAME at the end of your S3URL #{s3url}" if snapname.nil?
107
+ def initiate_restore snapurl
108
+ _ignore, _ignore, snapname = (opt[:fs] ? [nil, nil, snapurl] : snapurl_splice(snapurl))
109
+ raise "Must specify :SNAPSHOTNAME at the end of your S3URL #{snapurl}" if snapname.nil?
110
110
 
111
111
  cmd = {
112
112
  repository: opt[:repo],
@@ -123,18 +123,18 @@ module ElasticBackup
123
123
  end
124
124
 
125
125
  # Do a snapshot of an elasticsearch cluster
126
- def snapshot esurl, s3url, options
126
+ def snapshot esurl, snapurl, options
127
127
  elastic esurl
128
128
  set_opts(options)
129
- set_repository s3url, options
130
- initiate_snapshot s3url
129
+ set_repository snapurl, options
130
+ initiate_snapshot snapurl
131
131
  end
132
132
 
133
- def restore s3url, esurl, options
133
+ def restore snapurl, esurl, options
134
134
  elastic esurl
135
135
  set_opts(options)
136
- set_repository s3url
137
- initiate_restore s3url
136
+ set_repository snapurl, options
137
+ initiate_restore snapurl
138
138
  end
139
139
  end
140
140
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-backup-2s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Mitchell
@@ -318,13 +318,19 @@ dependencies:
318
318
  - - "~>"
319
319
  - !ruby/object:Gem::Version
320
320
  version: '0'
321
- description: "\n I simply want to be able to control the backup and\n restoration
322
- of the Elasticsearch cluster to S3\n without any fuss or having to dilly around
323
- with\n curl -XPUTS and friends.\n\n So here it is, and I make no apologies about
324
- not \n supporting the \"shared volume\" option of Elasticsearch\n snapshots. I
325
- may add support at a later date. Or\n feel free to add it and do a pull request.\n\n
326
- \ There are many features I wish to add to this, and\n if you have any suggestions,
327
- please feel free to send\n them my way!"
321
+ description: |2-
322
+
323
+ I simply want to be able to control the backup and
324
+ restoration of the Elasticsearch cluster to S3
325
+ without any fuss or having to dilly around with
326
+ curl -XPUTS and friends.
327
+
328
+ So here it is, and we now support Shared Volumes. See
329
+ the docs on the --fs flag.
330
+
331
+ There are many features I wish to add to this, and
332
+ if you have any suggestions, please feel free to send
333
+ them my way!
328
334
  email: fred.mitchell@gmx.de
329
335
  executables:
330
336
  - es-snapshot