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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 056e83371931b63ddaca8c2b498627937c162fe11bab3f10c2455823c1029bee
|
4
|
+
data.tar.gz: 74109af520ec387a17c413590e7f92b6b670cb8d71caa467c57eb52c4343dc14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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)
|