a guest Sep 15th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. cd /home/ubuntu/docker
  3. sudo rm -rf dhm-it-docker-backup/
  4. cp -r dhm-it-docker dhm-it-docker-backup
  5. datetime=$(date +"%Y_%m_%d_%I_%M_%p")
  6. docker exec dhmit_mariadb /usr/bin/mysqldump -u dhmit --password=dhmit123 drupal > /home/ubuntu/docker/dhm-it-docker-backup/docker/etc/mysql/$datetime.sql
  7. docker rm -f $(docker ps -aq)
  8. docker volume rm $(docker volume ls -q)
  9. sudo rm -rf dhm-it-docker/
  10. git clone --single-branch --branch master
  11. cp dhm-it-docker-backup/.env dhm-it-docker/
  12. cp dhm-it-docker-backup/docker/etc/mysql/$datetime.sql dhm-it-docker/docker/etc/mysql/
  13. cd dhm-it-docker
  14. git clone --single-branch --branch master
  15. git clone --single-branch --branch master
  16. cd ..
  17. cp -r dhm-it-docker-backup/BACK-DHM-IT/web/sites/default/files dhm-it-docker/BACK-DHM-IT/web/sites/default/files
  18. cd dhm-it-docker
  19. docker-compose up --build  -d
  20. docker exec dhmit_php composer install
  21. docker exec dhmit_php bash -c "cd web/ && drush cr"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand