capistrano3-postgres 0.2.3 → 0.2.4
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/README.md +13 -0
- data/lib/capistrano3/postgres/version.rb +1 -1
- data/lib/capistrano3/tasks/postgres.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e80a92bd0f933cc263c8a2147450b111c4aa47d
|
4
|
+
data.tar.gz: bc269fdedb5ae903c724e822dab203bdf52850bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d2556abe85c3a4f1d0391aa672654e258ee6464b882c462c002d975673c588e46fb5f9008f73e6d3a233a36ed1a2824c91448b4f232e47e3debb637ae78bfd9
|
7
|
+
data.tar.gz: 14377d6bc96bae2775703a212d1e6bf45a95e3bf337c7ac54ac1efba437313f906de852c473759eefdaf40660bac976bda41184a51bcf80ea8c9d47d5b850da0
|
data/README.md
CHANGED
@@ -61,6 +61,19 @@ If you are using different clusters:
|
|
61
61
|
set :postgres_remote_cluster, '9.6/main'
|
62
62
|
```
|
63
63
|
|
64
|
+
If you don't need one or more tables dumped:
|
65
|
+
|
66
|
+
```
|
67
|
+
set :postgres_backup_exclude_table, ['personal_data', 'logs'] # Will not dump tables
|
68
|
+
set :postgres_backup_exclude_table_data, -> { ['personal_data', 'logs'] } # Will not dump data for this tables
|
69
|
+
```
|
70
|
+
|
71
|
+
If you need only specific tables to be dumped:
|
72
|
+
|
73
|
+
```
|
74
|
+
set :postgres_backup_table, -> { ['users', 'orders'] }
|
75
|
+
```
|
76
|
+
|
64
77
|
## Contributing
|
65
78
|
|
66
79
|
1. Fork it ( http://github.com/spilin/capistrano3-postgres/fork )
|
@@ -9,6 +9,9 @@ namespace :load do
|
|
9
9
|
set :postgres_local_database_config, -> { nil }
|
10
10
|
set :postgres_remote_database_config, -> { nil }
|
11
11
|
set :postgres_remote_cluster, -> { nil }
|
12
|
+
set :postgres_backup_exclude_table_data, -> { [] }
|
13
|
+
set :postgres_backup_exclude_table, -> { [] }
|
14
|
+
set :postgres_backup_table, -> { [] }
|
12
15
|
end
|
13
16
|
end
|
14
17
|
|
@@ -32,9 +35,12 @@ namespace :postgres do
|
|
32
35
|
"-Fc",
|
33
36
|
"--file=#{fetch(:postgres_remote_sqlc_file_path)}",
|
34
37
|
"-Z #{fetch(:postgres_backup_compression_level)}",
|
38
|
+
fetch(:postgres_backup_exclude_table_data).map {|table| "--exclude-table-data=#{table}" },
|
39
|
+
fetch(:postgres_backup_exclude_table).map {|table| "--exclude-table=#{table}" },
|
40
|
+
fetch(:postgres_backup_table).map {|table| "--table=#{table}" },
|
35
41
|
fetch(:postgres_remote_cluster) ? "--cluster #{fetch(:postgres_remote_cluster)}" : nil,
|
36
42
|
"#{config['database']}"
|
37
|
-
].compact.join(' ')
|
43
|
+
].flatten.compact.join(' ')
|
38
44
|
end
|
39
45
|
end
|
40
46
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Krasynskyi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
|
-
rubygems_version: 2.
|
64
|
+
rubygems_version: 2.4.5.1
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Create, download and restore postgres database.
|