Created
December 23, 2020 14:18
-
-
Save markshust/99e22bc3507db876df4a3b8763176aec to your computer and use it in GitHub Desktop.
Helper script to sync dev environments with prod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| bin/restart | |
| echo "Restoring database from backup..." | |
| bin/clinotty mysql -h db -u root -pmagento magento < backups/latest.sql | |
| rsync -av username@hostname:/var/www/html/pub/media/wysiwyg/ src/pub/media/wysiwyg/ | |
| rsync -av username@hostname:/var/www/html/pub/media/ src/pub/media/ --exclude=import --exclude=tmp --exclude=cache --exclude=captcha | |
| bin/composer install | |
| bin/patch | |
| bin/magento app:config:import | |
| bin/magento setup:upgrade | |
| bin/magento cache:flush | |
| echo "Restore complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment