Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions scripts/get-dump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# this script was meant to be run on the server
# it will get you the database dump that you can use to populate your local database.
sudo docker exec -it service-psij mongodump --out=sc-dump
sudo docker cp service-psij:~/sc-dump ~/sc-dump

tar -cf sc-dump.tar sc-dump

sudo rm -rf sc-dump
ls -l
12 changes: 12 additions & 0 deletions scripts/restore-get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# run this script after running get-dump
# you will need to change the username below

scp -r aschwanden1@testing.exaworks.org:~/sc-dump.tar ~/sc-dump.tar
cd ~/
tar -xvf ~/sc-dump.tar

mongosh psi-j-testing-aggregator --eval "db.dropDatabase()"

mongorestore ~/sc-dump