redash_backup 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -2
- data/Gemfile.lock +1 -1
- data/README.md +9 -31
- data/Rakefile +0 -4
- data/exe/redash_backup +7 -0
- data/lib/redash_backup/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e356e2c523aec0f7a5393a39cd32bbffdcfc3138b859566f2cd07d27d6b8748
|
4
|
+
data.tar.gz: 111609164c2100ba6cda937416b22bab4f049e5ad819417951e7b35df63519f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4b5ea3fb81f1133912517c1d18baf94b77b724ecc3449e6f74d770998a1ac777edcfad117ddfa70bdb67c4a41e71b261120a82f51814146cbc76c7ad7d8f018
|
7
|
+
data.tar.gz: 5b8e9b935728867bfcaca02eaba6f081316e4172d53ebc5269fba81da942afe5be54b16c4577ca041212e8d389a3a5ad82f833b364b168b74a9c5593084e563f
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -19,41 +19,19 @@ Or install it yourself as:
|
|
19
19
|
$ gem install redash_backup
|
20
20
|
|
21
21
|
## Usage
|
22
|
-
|
23
|
-
- YOUR_REDEDASH_DATABASE_URL is like postgres://username:password@host:port/
|
22
|
+
- EXPORT_DIR_NAME is optional argument
|
23
|
+
- YOUR_REDEDASH_DATABASE_URL is like postgres://username:password@host:port/database
|
24
24
|
|
25
25
|
```sh
|
26
|
-
|
27
|
-
#
|
28
|
-
# export...
|
29
|
-
#
|
30
|
-
# ./queries/dashboard1/hoge.sql
|
31
|
-
# ./queries/dashboard1/page.sql
|
32
|
-
# ./queries/dashboard2/poko.sql
|
33
|
-
# ./queries/dashboard2/pako.sql
|
34
|
-
# ./queries/unused/maru.sql
|
35
|
-
# ./queries/unused/batu.sql
|
36
|
-
#
|
37
|
-
# ※ default export path: './queries'
|
38
|
-
# Can call without 'EXPORT DIR NAME'
|
39
|
-
# ex. rake redash:backup['YOUR REDEDASH DATABASE_URL']
|
40
|
-
```
|
41
|
-
|
42
|
-
### With zsh
|
43
|
-
|
44
|
-
```sh
|
45
|
-
※ Surround with single quotes
|
46
|
-
rake 'redash:backup[YOUR_REDEDASH_DATABASE_URL,EXPORT_DIR_NAME]'
|
47
|
-
#
|
26
|
+
bundle exec redash_backup YOUR_REDEDASH_DATABASE_URL EXPORT_DIR_NAME
|
48
27
|
# export...
|
49
28
|
#
|
50
|
-
# ./queries/dashboard1/hoge.sql
|
51
|
-
# ./queries/dashboard1/page.sql
|
52
|
-
# ./queries/dashboard2/poko.sql
|
53
|
-
# ./queries/dashboard2/pako.sql
|
54
|
-
# ./queries/unused/maru.sql
|
55
|
-
# ./queries/unused/batu.sql
|
29
|
+
# Completed export to ./queries/dashboard1/hoge.sql
|
30
|
+
# Completed export to ./queries/dashboard1/page.sql
|
31
|
+
# Completed export to ./queries/dashboard2/poko.sql
|
32
|
+
# Completed export to ./queries/dashboard2/pako.sql
|
33
|
+
# Completed export to ./queries/unused/maru.sql
|
34
|
+
# Completed export to ./queries/unused/batu.sql
|
56
35
|
#
|
57
36
|
# ※ default export path: './queries'
|
58
|
-
#
|
59
37
|
```
|
data/Rakefile
CHANGED
@@ -8,8 +8,4 @@ namespace :redash do
|
|
8
8
|
task :query_backup, [:db_url, :export_dir] do |task, args|
|
9
9
|
RedashBackup.new(args.db_url).execute(args.export_dir)
|
10
10
|
end
|
11
|
-
|
12
|
-
task :db_backup, [:db_url, :expoet_dir] do |task, args|
|
13
|
-
RedashBackup.new(args.db_url).db_dump(args.export_dir)
|
14
|
-
end
|
15
11
|
end
|
data/exe/redash_backup
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redash_backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tashiro
|
@@ -55,7 +55,8 @@ dependencies:
|
|
55
55
|
description: cli for back up redash queries
|
56
56
|
email:
|
57
57
|
- g4160hc@gmail.com
|
58
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- redash_backup
|
59
60
|
extensions: []
|
60
61
|
extra_rdoc_files: []
|
61
62
|
files:
|
@@ -70,6 +71,7 @@ files:
|
|
70
71
|
- Rakefile
|
71
72
|
- bin/console
|
72
73
|
- bin/setup
|
74
|
+
- exe/redash_backup
|
73
75
|
- lib/redash_backup.rb
|
74
76
|
- lib/redash_backup/base.rb
|
75
77
|
- lib/redash_backup/model.rb
|