benburkert-ey-backup 0.0.3.2 → 0.0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/bin/eybackup +8 -2
- metadata +1 -1
data/Rakefile
CHANGED
data/bin/eybackup
CHANGED
@@ -5,8 +5,7 @@ require "optparse"
|
|
5
5
|
require 'ey-backup/mysql_backup'
|
6
6
|
require 'ey-backup/postgresql_backup'
|
7
7
|
|
8
|
-
options = {:
|
9
|
-
:command => :new_backup}
|
8
|
+
options = {:command => :new_backup}
|
10
9
|
|
11
10
|
options[:config] = '/etc/.postgresql.backups.yml' if File.exists?('/etc/.postgresql.backups.yml')
|
12
11
|
|
@@ -54,6 +53,13 @@ end
|
|
54
53
|
|
55
54
|
opts.parse!
|
56
55
|
|
56
|
+
options[:config] ||= (File.exists?('/etc/.postgresql.backups.yml') ? '/etc/.postgresql.backups.yml' : '/etc/.mysql.backups.yml')
|
57
|
+
|
58
|
+
options[:engine] ||= case
|
59
|
+
when File.exists?('/etc/.mysql.backups.yml') then 'mysql'
|
60
|
+
when File.exists?('/etc/.postgresql.backups.yml') then 'postgresql'
|
61
|
+
end
|
62
|
+
|
57
63
|
eyb = nil
|
58
64
|
if File.exist?(options[:config])
|
59
65
|
eyb = case options[:engine]
|