simple_backup 0.2.0 → 0.2.1
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/LICENSE +21 -0
- data/README.md +18 -0
- data/lib/simple_backup/dsl.rb +2 -2
- data/lib/simple_backup/engine/mysql.rb +1 -1
- data/lib/simple_backup/mailer.rb +2 -2
- data/lib/simple_backup/storage.rb +1 -1
- data/lib/simple_backup/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd3e8ec26688c63d6e75643e4b962556b330c9ef
|
4
|
+
data.tar.gz: d721a3e4ee4cea8064440289e527f9633c553a17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba862bc3835154a09912e16c85eab02c7b8defc932dfb755f5d5d6fcaf4f473e1ee87109194520f0a57bbac34188458000ad37aeab9b4d7549845840f8cda6cc
|
7
|
+
data.tar.gz: f4eb040ff8315e5b35690ceb309237e8341090185376837e677afa50c92e7b457bbeda0b5f7b87a84142946974c4384f745b32241e5fff18aa1593b7d77aa13e
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Tomasz Maczukin <tomasz@maczukin.pl>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# simple_backup
|
2
|
+
|
3
|
+
[](http://badge.fury.io/rb/simple_backup)
|
4
|
+

|
5
|
+
|
6
|
+
Backup tool with simple DSL for configuration. Tool is under heavy
|
7
|
+
development and its API should be treat as unstable.
|
8
|
+
|
9
|
+
## TODO
|
10
|
+
|
11
|
+
- [ ] Refactorization
|
12
|
+
- [ ] Few backend for backup store (file, s3, ftp)
|
13
|
+
- [ ] Tests
|
14
|
+
- [ ] Docummentation and examples
|
15
|
+
|
16
|
+
## License
|
17
|
+
|
18
|
+
This is free sofware licensed under MIT license. See LICENSE file.
|
data/lib/simple_backup/dsl.rb
CHANGED
@@ -73,7 +73,7 @@ module SimpleBackup
|
|
73
73
|
@dbs = dbs
|
74
74
|
@dbs.each do |db, attr|
|
75
75
|
tables = []
|
76
|
-
@conn.query("SHOW TABLES FROM
|
76
|
+
@conn.query("SHOW TABLES FROM `#{db}`").each do |row|
|
77
77
|
tables << row["Tables_in_#{db}"]
|
78
78
|
end
|
79
79
|
tables = tables - attr[:exclude_tables] if attr[:exclude_tables]
|
data/lib/simple_backup/mailer.rb
CHANGED
@@ -10,7 +10,7 @@ module SimpleBackup
|
|
10
10
|
@to = []
|
11
11
|
@cc = []
|
12
12
|
@bcc = []
|
13
|
-
@hostname = Socket.gethostname
|
13
|
+
@hostname = Socket.gethostbyname(Socket.gethostname).first
|
14
14
|
end
|
15
15
|
|
16
16
|
def subject_prefix(prefix)
|
@@ -55,7 +55,7 @@ module SimpleBackup
|
|
55
55
|
|
56
56
|
@subject_prefix += '[FAILED]' if SimpleBackup.status == :failed
|
57
57
|
|
58
|
-
subject = "%s Backup %s for
|
58
|
+
subject = "%s Backup %s for %s" % [@subject_prefix, TIMESTAMP, @hostname]
|
59
59
|
Logger::debug "Subject: #{subject}"
|
60
60
|
|
61
61
|
body = get_body
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Maczukin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -75,6 +75,8 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
77
|
- Gemfile
|
78
|
+
- LICENSE
|
79
|
+
- README.md
|
78
80
|
- Rakefile
|
79
81
|
- backup_example.rb
|
80
82
|
- lib/simple_backup.rb
|
@@ -119,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
121
|
version: '0'
|
120
122
|
requirements: []
|
121
123
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.4.5
|
123
125
|
signing_key:
|
124
126
|
specification_version: 4
|
125
127
|
summary: Backup tool with simple DSL for configuration
|