scalingo_backups_manager 0.6.3 → 0.6.4

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
  SHA256:
3
- metadata.gz: 7be1ca03d45192dc394492ef8fb5c0a8b852ca08b4f96bbc4469960fda01e2f6
4
- data.tar.gz: 721b03b36837bff777bbc9e79fdc85e188fa03524fac0405c92844209ba2fa59
3
+ metadata.gz: 056e83371931b63ddaca8c2b498627937c162fe11bab3f10c2455823c1029bee
4
+ data.tar.gz: 74109af520ec387a17c413590e7f92b6b670cb8d71caa467c57eb52c4343dc14
5
5
  SHA512:
6
- metadata.gz: 4015ae6b481e82b6a565caa4db86738df7a819875241e405cc2ca742874ef8d09d3f68e50d13459a7cb341c07b4813aed998978a950afbafb6b97f6a4c115732
7
- data.tar.gz: 405ef4f1c59acd60099b9a5bd71246e906d181d86399ba998b4290f5dce976210ffe02b420aebb4f0a514975de13674aa007e54050efa60650e6e7a52a14c724
6
+ metadata.gz: 937f12a1baac04e58dbd1572e8176774d874a3ef67743cdd8da6c51054dfe78179f9bce64cf6a0af8e419803bfae88e9fb08df4641825017c10d5ba698351d5d
7
+ data.tar.gz: 164beb5eb694f5ad2f802d7eaf28cc66e6e04a190a9f08c0df75cbc7800409b5072706c3cd9a21e05051c3ca534bcd019b644d3a7679f981adb4a3ddd059f21d
@@ -33,8 +33,12 @@ module ScalingoBackupsManager
33
33
  password: rails_db_config["password"],
34
34
  user: rails_db_config["user"],
35
35
  }
36
-
37
- restore_cmd = "/usr/bin/env pg_restore"
36
+ restore_cmd = ""
37
+ if config[:password].present?
38
+ restore_cmd = "PGPASSWORD=#{config[:password]} "
39
+ end
40
+ restore_cmd << "/usr/bin/env"
41
+ restore_cmd << " pg_restore"
38
42
 
39
43
  file_path = Dir["#{destination_path}*.pgsql"]
40
44
  if file_path.empty?
@@ -54,7 +58,7 @@ module ScalingoBackupsManager
54
58
  restore_cmd << " -p #{opts[:port] || config[:port] || 5432}"
55
59
  end
56
60
 
57
- restore_cmd << " -d #{config[:database]}"
61
+ restore_cmd << " -d #{config[:database]} --no-owner"
58
62
 
59
63
  puts "*** Restoring backup to Postgres database ***"
60
64
  system(restore_cmd)
@@ -1,3 +1,3 @@
1
1
  module ScalingoBackupsManager
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scalingo_backups_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Clercin