Skip to content

Commit 3731dfe

Browse files
authored
fix: seed-local-db script (#666)
1 parent 33c7f4f commit 3731dfe

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

seed-local-db.sh

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
#!/usr/bin/env bash
22

3-
#Create Time Stamp
4-
DATE=`date "+%Y%m%d"`
5-
6-
TIMESTAMP=`date "+%Y%m%d-%H%M%S"`
7-
8-
set -e
9-
103
#Backup Remote database
11-
curl `heroku pg:backups public-url --app bloom-backend-staging` > bloom_$TIMESTAMP.dump
4+
heroku pg:backups:capture --app bloom-backend-staging
5+
heroku pg:backups:download --app bloom-backend-staging
126

137
#Load backup into local database
14-
docker exec -i bloom-local-db pg_restore -U postgres -d bloom < bloom_$TIMESTAMP.dump
8+
docker exec -i bloom-local-db pg_restore -U postgres -d bloom < latest.dump
9+
10+
rm latest.dump

0 commit comments

Comments
 (0)