Skip to content

DevOps: recreate dev or stg DBs if removed during Jenkins task to 'Backup PROD DB and Refresh STG and DEV DBs"

Joshua Drumm edited this page Jun 23, 2022 · 3 revisions

The Jenkins task to 'Backup PROD DB and Refresh STG and DEV DBs' runs weekly on Sunday evenings. We have seen a few instances where this job fails after dropping the DEV DB - leaving the DEV environment in a broken state (500 error). To resolve this...

  1. Connect and login to the DEV server instance (currently: DM_Dev_2021_AmzLnx2)
  2. Sign in as the ec2-user with sudo su ec2-user
  3. Enter the diffusion marketplace project with cd ~/diffusion-marketplace
  4. Enter the Docker container for the application - i.e., sudo docker exec -it diffusion-marketplace_app_1 bash
  5. Recreate the DB: rails db:create
  6. Rerun the Jenkins Task Backup PROD DB and Refresh STG and DEV DBs

If the task succeeds DEV environment should be working and the DEV DB should have prod data.

Clone this wiki locally