elastic-backup-2s3 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/README.org +2 -1
- data/Rakefile +2 -4
- data/elastic-backup-2s3.gemspec +3 -3
- data/lib/elastic-backup-2s3/snapshot.rb +15 -15
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77699d024d5d9f82da71fb7c22fcc643216be7ac
|
4
|
+
data.tar.gz: 12987b551dad9dccfca651dff0ba584e624c366a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af3402692b145675cf711e9310f9866ab2d9b4b058f08b16e21a1020b2a170f010ecf32f71d98a4ce760b59e5e11785d802aad3c2cdbdce58e272e80c013633b
|
7
|
+
data.tar.gz: e3ae8d1b149427dbaadf93581c8cb6bf9e08740b8fd11628a5ab160f66c83c072b59774dde7a4349bafd0f113419cf3967e6fada2e3d75c8c1107573d6e81d61
|
data/.semver
CHANGED
data/README.org
CHANGED
@@ -125,8 +125,9 @@
|
|
125
125
|
** Release Notes
|
126
126
|
| Date | Version | Description |
|
127
127
|
|------------+---------+-------------------------------------------------------------------------|
|
128
|
-
| 2016-
|
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
|
35
|
-
|
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
|
data/elastic-backup-2s3.gemspec
CHANGED
@@ -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.
|
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.
|
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
|
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
|
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
|
61
|
-
bucket, base_path, _ignore = opt[:fs] ? [nil, nil, nil] :
|
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
|
89
|
-
_ignore, _ignore, snapname = (opt[:fs] ? [nil, nil,
|
90
|
-
raise "Must specify :SNAPSHOTNAME at the end of your S3URL #{
|
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
|
108
|
-
_ignore, _ignore, snapname = (opt[:fs] ? [nil, nil,
|
109
|
-
raise "Must specify :SNAPSHOTNAME at the end of your S3URL #{
|
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,
|
126
|
+
def snapshot esurl, snapurl, options
|
127
127
|
elastic esurl
|
128
128
|
set_opts(options)
|
129
|
-
set_repository
|
130
|
-
initiate_snapshot
|
129
|
+
set_repository snapurl, options
|
130
|
+
initiate_snapshot snapurl
|
131
131
|
end
|
132
132
|
|
133
|
-
def restore
|
133
|
+
def restore snapurl, esurl, options
|
134
134
|
elastic esurl
|
135
135
|
set_opts(options)
|
136
|
-
set_repository
|
137
|
-
initiate_restore
|
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.
|
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:
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
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
|