Last active
November 29, 2018 17:36
-
-
Save kerasai/12d4f74b146bf2eeaa50a3a26a8c94f5 to your computer and use it in GitHub Desktop.
Repeat a migration when it fails due to not enough memory (Drupal, Pantheon, Terminus)
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
#!/usr/bin/env bash | |
# Adjust as needed to run desired migration in desired multidev. | |
SITE_ID=[site_env] | |
MIGRATION=[migration_id`] | |
CONTINUE=0 | |
while [ $CONTINUE -eq 0 ] | |
do | |
echo "Running migration command..." | |
terminus drush ${SITE_ENV} -- mim --feedback=100 ${MIGRATION} > /tmp/migrate-result.txt | |
grep "not enough" /tmp/migrate-result.txt > /dev/null | |
CONTINUE=$? | |
done | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment