server_backups 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/server_backups/config.rb +4 -2
- data/lib/server_backups/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4b12d133a4c0a710826b522ca8f4ed179bab5a9
|
4
|
+
data.tar.gz: 436d356c481c3fb5a2fb58143886ef132e4ed874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a58929af919f09dbdcc1372e16ab92336f102bce971192bdbb29cce67def144203cdd601022c469c9c1680b56bf00b0a617538f80a77ff5bd53d3d1714253a0
|
7
|
+
data.tar.gz: c30e859d7e8e67bea2ee025ecb41928c9a1323809a0966fa967c235e3e730ebe4313cbb6f8a5bf8502e6e9de8e651533c0e82a42c28fff5d4cf6cb4c7fbf2476
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -69,7 +69,7 @@ The latter option is useful if you'd like to keep passwords and keys in variable
|
|
69
69
|
rather than saving them to the filesystem.
|
70
70
|
|
71
71
|
```bash
|
72
|
-
envsubst < back_conf.yml.tmpl | server_backup daily
|
72
|
+
envsubst < back_conf.yml.tmpl | server_backup daily -c -
|
73
73
|
```
|
74
74
|
|
75
75
|
### Set up your crontab.
|
@@ -15,7 +15,8 @@ module ServerBackups
|
|
15
15
|
def initialize(config_file = nil)
|
16
16
|
if config_file == '-'
|
17
17
|
@config_file = config_file
|
18
|
-
|
18
|
+
@@config ||= YAML::safe_load STDIN.read()
|
19
|
+
@config = @@config
|
19
20
|
else
|
20
21
|
@config_file = config_file || default_config_file
|
21
22
|
@config = YAML.load_file File.expand_path(config_file)
|
@@ -23,7 +24,8 @@ module ServerBackups
|
|
23
24
|
|
24
25
|
@logging = @config['logging']
|
25
26
|
@logger = Logger.new(log_device, logfile_count, logfile_size)
|
26
|
-
rescue Errno::ENOENT
|
27
|
+
rescue Errno::ENOENT => e
|
28
|
+
puts e.backtrace
|
27
29
|
warn "missing config file #{config_file}"
|
28
30
|
exit 1
|
29
31
|
end
|