Skip to content

Commit cfc40b3

Browse files
committed
Add dbrestore option in control
1 parent 3e84368 commit cfc40b3

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ Enter test database container:
5757
./control testdb
5858
```
5959

60+
Restore db locally:
61+
62+
```
63+
./control dbrestore <filename.gz>
64+
```
65+
6066
## Running Tests
6167

6268
To setup the testing environment run:

control

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ case "$1" in
2020
docker exec -ti $dbtestcont bash
2121
;;
2222

23+
dbrestore)
24+
dbcont="$(docker-compose ps -q db)"
25+
gunzip < $2 | docker exec -i $dbcont psql -U moodle_user postgres
26+
;;
27+
2328
*)
2429
echo Invalid command "$1"
2530
exit 1

0 commit comments

Comments
 (0)