Skip to content

Commit b5ecaa4

Browse files
authored
Merge pull request #82 from humpbackdev/feature/79-install-from-db-backup
Added command for installation of the site based on db backup.
2 parents 0e7349a + ed6d961 commit b5ecaa4

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

generators/app/templates/_site.ahoy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,27 @@ commands:
6262
if [ -f ./config/sync/core.extension.yml ] ; then ahoy drush cim -y ; fi
6363
echo "Cleaning cache..."
6464
ahoy drush cr
65+
install-from-db:
66+
usage: Setup site using DB backup
67+
cmd: |
68+
if [ ! -f <%= appName %>.sql.gz ]; then
69+
wget `terminus backup:get <%= appName %>.live --element=db` -O <%= appName %>.sql.gz
70+
fi
71+
ahoy drush cr
72+
echo "Drop Database..."
73+
ahoy drush sql-drop -y
74+
echo "Import database..."
75+
gunzip -c <%= appName %>.sql.gz | ahoy drush sqlc
76+
echo "Update database..."
77+
ahoy drush updb -y
78+
echo "Importing config..."
79+
ahoy drush cim -y
80+
echo "Cleaning cache..."
81+
ahoy drush cr
82+
echo "Sanitizing database..."
83+
ahoy drush sqlsan -y
84+
echo "Generating an admin one time login link..."
85+
ahoy drush uli
6586
local-settings:
6687
usage: Generate local settings
6788
cmd: |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-humpback",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Generate a Drupal project using humpback",
55
"homepage": "https://humpbackdev.com",
66
"author": {

0 commit comments

Comments
 (0)