DevOps: recreate dev or stg DBs if removed during Jenkins task to 'Backup PROD DB and Refresh STG and DEV DBs" - department-of-veterans-affairs/diffusion-marketplace GitHub Wiki
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...
- Connect and login to the DEV server instance (currently: VAC10APPDMA800)
- Sign in as the ec2-user with
sudo su ec2-user - Enter the diffusion marketplace project with
cd ~/diffusion-marketplace - Enter the Docker container for the application - i.e.,
sudo docker exec -it diffusion-marketplace_app_1 bash - Recreate the DB:
rails db:create - Rerun the Jenkins Task
Backup PROD DB and Refresh STG OR DEV DBsdepending on the environment that is broken
If the task succeeds DEV environment should be working and the DEV DB should have prod data.