syncoku 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/syncoku/capture_backup.rb +3 -3
- data/lib/syncoku/local_db.rb +3 -3
- data/lib/syncoku/remote_db.rb +2 -2
- data/lib/syncoku/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34a3447554ace119b227a084c0141264e84821b3
|
4
|
+
data.tar.gz: 3015e4f774264dfaa5f27c36e955023c17183abc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5ebd4c12cde486263ee4d48d3d2991c7844eaaeb803d75fd8de41ebbbda2dafc4323c0aefcb314bddcc0a8aaf79ce5531c81b1ce082f1ea9e4b6633f5a652dc
|
7
|
+
data.tar.gz: b1cbf335b6e1d11f1e10e867c411f7afd32a80333188aff02f8a4b03cd33e78abea48bf8d71584441098966a438085045d873895d39a5d401f88a5b8925225aa
|
@@ -4,8 +4,8 @@ module Syncoku
|
|
4
4
|
|
5
5
|
def capture
|
6
6
|
puts "Capturing #{production_app_name} backup..."
|
7
|
-
run_on_production("
|
8
|
-
run_on_production("
|
7
|
+
run_on_production("pg:backups capture")
|
8
|
+
run_on_production("pg:backups public-url")
|
9
9
|
end
|
10
10
|
|
11
11
|
def run_on_production(command)
|
@@ -18,4 +18,4 @@ module Syncoku
|
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
21
|
-
end
|
21
|
+
end
|
data/lib/syncoku/local_db.rb
CHANGED
@@ -90,8 +90,8 @@ module Syncoku
|
|
90
90
|
if output =~ /a transfer is currently in progress/
|
91
91
|
puts "It looks like a backup is already in progress (or possibly stuck):"
|
92
92
|
puts output
|
93
|
-
`heroku
|
94
|
-
puts "Use
|
93
|
+
`heroku pg:backups --app #{production_app}`
|
94
|
+
puts "Use pg:backups delete to remove the offending backup (or wait a bit to see if it fixes itself)"
|
95
95
|
exit 1
|
96
96
|
end
|
97
97
|
end
|
@@ -109,4 +109,4 @@ module Syncoku
|
|
109
109
|
end
|
110
110
|
|
111
111
|
end
|
112
|
-
end
|
112
|
+
end
|
data/lib/syncoku/remote_db.rb
CHANGED
@@ -15,7 +15,7 @@ module Syncoku
|
|
15
15
|
run_remotely "maintenance:on"
|
16
16
|
puts "Restoring database"
|
17
17
|
run_remotely "pg:reset DATABASE_URL --confirm #{app_name}"
|
18
|
-
run_remotely "
|
18
|
+
run_remotely "pg:backups restore '#{capture}' DATABASE_URL --confirm #{app_name}"
|
19
19
|
run_remotely "run rake db:migrate"
|
20
20
|
run_remotely "run rake syncoku:after_sync"
|
21
21
|
run_remotely "restart"
|
@@ -28,4 +28,4 @@ module Syncoku
|
|
28
28
|
end
|
29
29
|
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
data/lib/syncoku/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syncoku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Horsman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|