Last active
January 31, 2017 16:26
-
-
Save ianlintner-wf/0ac5221397407f3474176aba41716a2d to your computer and use it in GitHub Desktop.
Drush Migrate a Drupal Site Variable Between Sites in JSON. #Drush #vget #vset #json #pipe #Drupal #export #import
This file contains 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
# Drush script to port specific variables. Can be used with other bash scripts for looping/migration. | |
# This is a first version and could be cleaned up and use ENVs | |
# $1 source site alias | |
# $2 target site alias | |
# $3 variable name | |
# drush @alias.source vget --format=json --exact custom_module_variable | drush @alias.target vset --format=json --exact custom_module_variable - | |
# Remeber there is a "-" at the end of the vset command! | |
drush $1 vget --format=json --exact $3 | drush $2 vset --format=json --exact $3 - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script exports a variable from Drupal site via drush in a json format and imports it into another. Script to speed up Drupal deploys & migration using drush.