Skip to content

Instantly share code, notes, and snippets.

@iamstoick
Last active March 7, 2018 03:12
Show Gist options
  • Select an option

  • Save iamstoick/898fd4a8db824e57ee3a85c9ce658267 to your computer and use it in GitHub Desktop.

Select an option

Save iamstoick/898fd4a8db824e57ee3a85c9ce658267 to your computer and use it in GitHub Desktop.
External to Pantheon Drupal 7 and 8 Migration

Drupal Migration (External to Pantheon)

Drupal 7

Step 1: Click Migrate Existing Site

Step 2: Specify the existing URL and choose existing site CMS

Step 3: Create a tar (of the site you want to migrate). SSH to your site server and run this command.

drush ard --destination=sites/default/files/P0zG8ohjLKFBI6Y.tgz

If you have site alias you can skip the SSH part and run the command locally.

drush SITE.ENV ard --destination=sites/default/files/P0zG8ohjLKFBI6Y.tgz

Where:

P0zG8ohjLKFBI6Y.tgz - is the filename of the compressed codebase from the dashboard migration page

SITE - is the site name you specified in your Drush alias (see PROJECT.drush.aliases.php)

ENV - remote environment (dev, test, live) (see PROJECT.drush.aliases.php)

Step 4: Migrate the site:

Option 1: Via Terminus

terminus import:site gv-d7-migration-test http://yourdomain.com/sites/default/files/J0x1hKz8ULQCC7V.tgz

Where:

gv-d7-migration-test - is the site name of the destination server

http://yourdomain.com/sites/default/files/J0x1hKz8ULQCC7V.tgz - is the URL of the generated archive from step 3

Note: Be cautious with the URL it contains // before sites/default.

Here is the typical error when you forgot to remove the extra /.

[error]  Unable to download archive from "http://yourdomain.com//sites/default/files/J0x1hKz8ULQCC7V.tgz", encountered HTTP Error 404: Not Found. 

Answer the question:

Are you sure you overwrite the code, database and files for dev on gv-d7-migration-test? (yes/no) [no]:

And watch the dashboard progress….

Output when migration is done:

[notice] Imported site onto Pantheon

Option 2: Via URL. Just click the Import Archive button.

Step 5: Once migration is done you will be able to see the Visit the Site Dashboard button.

Drupal 8

Step 1: Click Migrate Existing Site

Step 2: Specify the existing URL and choose existing site CMS

Step 3: Create a tar (of the site you want to migrate). SSH to your site server and run this command.

drush ard --destination=sites/default/files/P0zG8ohjLKFBI6Y.tgz

If you have site alias you can skip the SSH part and run the command locally.

drush SITE.ENV ard --destination=sites/default/files/P0zG8ohjLKFBI6Y.tgz

Where:

P0zG8ohjLKFBI6Y.tgz - is the filename of the compressed codebase from the dashboard migration page

SITE - is the site name you specified in your Drush alias (see PROJECT.drush.aliases.php)

ENV - remote environment (dev, test, live) (see PROJECT.drush.aliases.php)

Step 4: Migrate the site:

Option 1: Via Terminus

terminus import:site gv-d8-migration-terminus http://yourdomain.com/sites/default/files/tiwJxOJh1PiFDz9.tgz

Where:

gv-d8-migration-terminus - is the site name of the destination server

http://yourdomain.com/sites/default/files/tiwJxOJh1PiFDz9.tgz - is the URL of the generated archive from step 3

Note: Be cautious with the URL it contains // before sites/default.

Here is the typical error when you forgot to remove the extra /.

[error]  Unable to download archive from "http://yourdomain.com//sites/default/files/tiwJxOJh1PiFDz9.tgz", encountered HTTP Error 404: Not Found. 

Answer the question:

Are you sure you overwrite the code, database and files for dev on gv-d8-migration-terminus? (yes/no) [no]:

And watch the dashboard progress….

Note: Sometimes the import progress is not showing. If you are able to see the Drush output below Imported site onto Pantheon that means the migration is done. Refresh the browser and you should be able to see the “Visit the Site Dashboard” button.

Output when migration is done:

[notice] Imported site onto Pantheon

Option 2: Via URL. Just click the Import Archive button.

Step 5: Once migration is done you will be able to see the Visit the Site Dashboard button.

Related: Pantheon to Pantheon Migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment