k8sflow 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/k8sflow/command/pg/copy.rb +2 -2
- data/lib/k8sflow/command/pg/dump.rb +2 -2
- data/lib/k8sflow/command/pg/pg_topic.rb +5 -3
- data/lib/k8sflow/version.rb +1 -1
- data/lib/k8sflow.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: 34abedf5764a455835ae559f2eb78bec0ba15b71
|
4
|
+
data.tar.gz: 798f35f53a9cb437ffeeab6324e567ce9b46f1a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 124705222df2f18e55eff593f00fab862419478724436813b47d4fc7c1a9318e8ac406f0313baa5de2ab73c8e07051573cccdac9fafdd6d0a62f9dd8f1a69b64
|
7
|
+
data.tar.gz: 7d4ee3db27dfc03aa5a84e20d4ad5652014b8889f955740f3f48692ced6fb0a102eec9ee43e769d5353c53540a5a5ac046f42f260d26522f79f2fd59ed61ea23
|
@@ -15,10 +15,10 @@ module K8sflow
|
|
15
15
|
|
16
16
|
def self.call
|
17
17
|
source_db = database(options[:source])
|
18
|
-
puts "env PGSSLMODE=#{ssl?} PGPASSWORD=#{source_db[:password]} pg_dump --host #{source_db[:host]} --port #{source_db[:port]} --username #{source_db[:user]} --verbose -Z 0 --clean --format=c --no-owner --no-acl #{source_db[:database]} | env PGSSLMODE=#{ssl?} PGPASSWORD=#{database[:password]} pg_restore --port #{database[:port]}--host #{database[:host]} --username #{database[:user]} --verbose --no-acl --no-owner -d #{database[:database]}"
|
18
|
+
puts "env PGSSLMODE=#{ssl?} PGPASSWORD=#{source_db[:password]} pg_dump --host #{source_db[:host]} --port #{source_db[:port]} --username #{source_db[:user]} --verbose -Z 0 --clean --format=c --no-owner --no-acl -d #{source_db[:database]} | env PGSSLMODE=#{ssl?} PGPASSWORD=#{database[:password]} pg_restore --port #{database[:port]}--host #{database[:host]} --username #{database[:user]} --verbose --no-acl --no-owner -d #{database[:database]}"
|
19
19
|
confirm_command("on #{database[:host]} overwrite the database #{database[:database]}")
|
20
20
|
|
21
|
-
exec("env PGSSLMODE=#{ssl?} PGPASSWORD=#{source_db[:password]} pg_dump --host #{source_db[:host]} --port #{source_db[:port]} --username #{source_db[:user]} --verbose -Z 0 --clean --format=c --no-owner --no-acl
|
21
|
+
exec("env PGSSLMODE=#{ssl?} PGPASSWORD=#{source_db[:password]} pg_dump --host #{source_db[:host]} --port #{source_db[:port]} --username #{source_db[:user]} --verbose -Z 0 --clean --format=c --no-owner --no-acl -d #{source_db[:database]} | env PGSSLMODE=#{ssl?} PGPASSWORD=#{database[:password]} pg_restore --port #{database[:port]} --host #{database[:host]} --username #{database[:user]} --verbose --no-acl --no-owner -d #{database[:database]}")
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -15,8 +15,8 @@ module K8sflow
|
|
15
15
|
def self.call
|
16
16
|
file = File.new("#{options[:dest]}/#{database[:database]}_#{database[:host]}_#{Time.now.iso8601}.dump", 'wb')
|
17
17
|
|
18
|
-
puts "PGSSLMODE=#{ssl?} PGPASSWORD
|
19
|
-
exec("PGSSLMODE=#{ssl?} PGPASSWORD=#{database[:password]} pg_dump -p #{database[:port]}--host #{database[:host]} --username #{database[:user]} --clean --format=c --no-owner --no-acl #{database[:database]} > #{file.path}")
|
18
|
+
puts ("PGSSLMODE=#{ssl?} PGPASSWORD=#{database[:password]} pg_dump -p #{database[:port]} --host #{database[:host]} --username #{database[:user]} --clean --format=c --no-owner --no-acl -d #{database[:database]} > #{file.path}")
|
19
|
+
exec("PGSSLMODE=#{ssl?} PGPASSWORD=#{database[:password]} pg_dump -p #{database[:port]} --host #{database[:host]} --username #{database[:user]} --clean --format=c --no-owner --no-acl -d #{database[:database]} > #{file.path}")
|
20
20
|
|
21
21
|
file.close
|
22
22
|
end
|
@@ -4,10 +4,12 @@ module K8sflow
|
|
4
4
|
register name: 'pg',
|
5
5
|
description: 'Manage postgres actions'
|
6
6
|
|
7
|
-
option :
|
8
|
-
|
9
|
-
option :database, '-d', '--database DATABASE', 'Database name or URI', required: true
|
7
|
+
option :database, '-d', '--database DATABASE', '[REQUIRED] Database uri or alias', required: true
|
10
8
|
option :ssl, "--ssl", "enable sslmode"
|
9
|
+
|
10
|
+
option :databases, "--databases alias1=postgresql_URI,alias2=postgresql_URI2", Array, "Create database aliases"
|
11
|
+
|
12
|
+
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
data/lib/k8sflow/version.rb
CHANGED
data/lib/k8sflow.rb
CHANGED
@@ -7,7 +7,8 @@ Clitopic.version = K8sflow::VERSION
|
|
7
7
|
Clitopic.commands_dir = "#{__FILE__}/k8sflow/command"
|
8
8
|
Clitopic.default_files = [File.join(Dir.getwd, ".k8sflow.yml"), File.join(Dir.home, ".k8sflow.yml")]
|
9
9
|
|
10
|
-
|
10
|
+
Clitopic.help_page = "https://github.com/ant31/k8sflow/wiki"
|
11
|
+
Clitopic.issue_report = "https://github.com/ant31/k8sflow/issues/new"
|
11
12
|
require 'k8sflow/cli'
|
12
13
|
|
13
14
|
|