backup2s3 0.4.0.pre → 0.4.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/db_adapters/postgresql_adapter.rb +2 -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: 244ac269ffa0606a075abbad05467cb3cdbfe129
|
4
|
+
data.tar.gz: b8f0d9eb9f86a1fad92f089c30904ec36573d888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9a0778474d716e5f7ae166728c6cdafd1d52070b81b990038dced186120bbefff5aadf5b546ddeaacf6b99861ec07d2ae57cecec3fc1074c17eb258e937e13b
|
7
|
+
data.tar.gz: d11a591ba0351d88c69ea185f21f28ad6f908a7c24da3c69810af30b422d052a44b4b679528d8f0ba8d3d80b5ad54b5616bc7d1055505ba08234f3061d845445
|
@@ -9,9 +9,10 @@ class PostgresqlAdapter
|
|
9
9
|
# Returns .tar.gz file
|
10
10
|
def db_dump
|
11
11
|
dump_file = Tempfile.new("dump")
|
12
|
+
username = @db_credentials['username']
|
12
13
|
password = @db_credentials['password']
|
13
14
|
database = @db_credentials['database']
|
14
|
-
cmd = "PGPASSWORD=\"#{password}\" pg_dump -Ft #{database} > #{dump_file.path}"
|
15
|
+
cmd = "PGPASSWORD=\"#{password}\" && PGUSER=\"#{username}\" pg_dump -Ft #{database} > #{dump_file.path}"
|
15
16
|
System.run(cmd)
|
16
17
|
dump_file
|
17
18
|
end
|