Created
March 4, 2019 13:34
-
-
Save pfrenssen/e027b964461a5e1c26c1c6be3592734c to your computer and use it in GitHub Desktop.
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 -e | |
# Mount the backup drive. | |
if ! grep -qs '/mnt/workspace ' /proc/mounts; then | |
sudo mount /dev/sdc1 /mnt/workspace/ | |
fi | |
# Update code base. | |
./vendor/bin/composer install --prefer-source | |
# Restore the backup of the database. | |
# sudo mariabackup --databases=joinup --prepare --target-dir=/mnt/workspace/backups/joinup/ --user=root | |
# sudo mariabackup --databases=joinup --copy-back --target-dir=/mnt/workspace/backups/joinup/ --user=root | |
drush sqlc < /mnt/workspace/backups/joinup-dump.sql | |
# Update to the current code base. | |
./vendor/bin/drush cache:clear bin config --yes && | |
./vendor/bin/drush updatedb --yes && | |
./vendor/bin/drush cs-update --discard-overrides --yes && | |
./vendor/bin/drush search-api:reset-tracker --yes && | |
./vendor/bin/drush cache-rebuild --yes && | |
./vendor/bin/drush php:eval "if(node_access_needs_rebuild()) { node_access_rebuild(); }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment