ey_cloud_server 1.4.49 → 1.4.50

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: b322ebd431ff9f4bd27a8a908d145ad4e70f01e9
4
- data.tar.gz: 4a67d4081f42712cd36e8d683f1b00f767196d7a
3
+ metadata.gz: 71e9b1c4d7b201fb07ffd37a228682237b59a439
4
+ data.tar.gz: 98db024600f2556e0ac35f9b0378020ed7cc6251
5
5
  SHA512:
6
- metadata.gz: 25bf1195e76d0042b379f7bc3aa9fb21e7ff30b5ab8b0b93cabc698c54032ec8dc15a20cd3b163e3d314fda03404310ca4e437fd2612d4d87e0714469b791499
7
- data.tar.gz: 1211cea6558f7b4d1639bc686d24c015522fd35a69f55733b6cc7091a2a7e66ae2b920e597e48b009d99734701c19301d5188a306989f15074fe0b02744bb0d7
6
+ metadata.gz: b5044503b66680d4a0701fc7f804077208b55dab7dd2315c1cb5acd3836fe79eca258fb5eb7048522e0151411049e7ffcea662e8735b00f382ccfae8c37cfbfd
7
+ data.tar.gz: a85c33114c5abc10986dd37eb4507c1428b07ca4b111e3dff2086c938d8532330949d7f45220e938af1ce62718f116a293d13cfc83f4317409edb421303efa74
@@ -24,18 +24,19 @@ module EY
24
24
  end
25
25
 
26
26
  def load(database_name, file)
27
- cycle_database(database_name)
28
27
  command = "cat #{file}"
29
28
 
30
- if gpg?
31
- raise "Cannot load a GPG backup"
29
+ if file =~ /.gpz$/ # GPG?
30
+ abort "Cannot restore a GPG backup directly; decrypt the file (#{file}) using your key and then load using the mysql client."
32
31
  else
33
32
  command << " | " << GZipper.gunzip
34
33
  end
34
+
35
+ cycle_database(database_name)
35
36
 
36
- command << " | mysql #{username_option} #{host_option} #{database_name}"
37
+ command << " | mysql #{username_option} #{host_option} #{database_name} 2> /tmp/eybackup.$$.dumperr"
37
38
 
38
- run(command)
39
+ run(command, database_name)
39
40
  end
40
41
 
41
42
  def check_if_replica
@@ -21,15 +21,15 @@ module EY
21
21
  end
22
22
 
23
23
  def load(database_name, file)
24
+ if file =~ /.gpz$/ # GPG?
25
+ abort "Cannot restore a GPG backup directly; decrypt the file (#{file}) using your key and then load with pg_restore."
26
+ end
27
+
24
28
  cycle_database(database_name)
25
29
 
26
30
  command = "cat #{file}"
27
31
 
28
- if gpg?
29
- raise "Cannot load a GPG backup"
30
- end
31
-
32
- command << " | PGPASSWORD='#{password}' pg_restore -h #{host} --clean --format=c -Upostgres -d #{database_name}"
32
+ command << " | PGPASSWORD='#{password}' pg_restore -h #{host} --clean --format=c -Upostgres -d #{database_name} 2> /tmp/eybackup.$$.dumperr"
33
33
 
34
34
  run(command, database_name)
35
35
  end
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  module CloudServer
3
- VERSION = '1.4.49'
3
+ VERSION = '1.4.50'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey_cloud_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.49
4
+ version: 1.4.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - EngineYard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-06 00:00:00.000000000 Z
11
+ date: 2016-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json