Skip to content

these scripts are meant to document how to get a new database dump fo… #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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 [email protected]:~/sc-dump.tar ~/sc-dump.tar
cd ~/
tar -xvf ~/sc-dump.tar

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

mongorestore ~/sc-dump