-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from ukparliament/add-things-to-help-get-db-du…
…mps-etc Add some helper scripts
- Loading branch information
Showing
7 changed files
with
31 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
/lib/tweet/tokens.rb | ||
.DS_Store | ||
|
||
|
||
data | ||
latest.dump | ||
|
||
# Ignore bundler config. | ||
/.bundle | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
heroku pg:backups:capture | ||
heroku pg:backups:download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d written_answers latest.dump | ||
rake db:migrate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
echo "Remove link latest.dump" | ||
rm latest.dump | ||
|
||
echo "Download latest" | ||
heroku pg:backups:capture | ||
heroku pg:backups:download | ||
|
||
echo "Rename latest" | ||
now=`date +"%d-%m-%Y"` | ||
mv latest.dump data/$now.latest.dump | ||
|
||
echo "Link latest file" | ||
ln -sf data/$now.latest.dump latest.dump | ||
|
||
echo "reset" | ||
./reset.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rake db:drop | ||
rake db:create | ||
./heroku_file_to_db.sh | ||
|