-
Notifications
You must be signed in to change notification settings - Fork 5
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
Write a script to create a full local copy of production database on dev #246
Comments
Made a first pass at this this morning with limited results that I am recording here. This should be doable using the mongoexport/mongoimport commands but I cannot seem to get a connection to the db from the amplicon-dev ubuntu node ( error connecting to db server: no reachable servers). Not sure if this is a mongo/documentdb version incompatibility. From within the container I can connect using pymongo from within the container. Export script is from bson.json_util import dumps mstr = "DB_URI_SECRET from config file" collections = database.collection_names() |
The DBs are too big to export on dev or prod nodes (prod is 145GB, disk is 80GB so it won't fit). In the meantime I added a file /home/ubuntu/AmpliconRepository-dev/mongo_shell.sh that is setup so that you can use a docker container of appropriate version to get a mongo shell into the DocumentDB database. It should be easily modifiable to use mongodump and mongorestore to make a new copy |
@liefeld - I'm not sure it needs to be the entire DB that we clone for testing purposes. How about something like all public non-deleted projects? Or all non-deleted projects for a specific user. Thoughts? |
use caper |
Shelving this issue for the moment because there are no issues currently where we need to have a copy of the production database. Copy is also very large (80gb?). |
Allows better testing of weirdness that can happen in production environment.
The text was updated successfully, but these errors were encountered: