Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Hauling Data: New Migration Tools and Techniques

Parent Feed: 

Some of the biggest questions that come up for developers with a next-generation platform like Pantheon are "how do I get my database synced?" or "what about migrating large amounts of files?"

Upload where you downloadYou've asked and we've listened. In the past week we've deployed a couple updates to make moving your data around much easier, including new command-line capabilities for advanced users.

First, as the initial release of a series of updates we're making to the control panel we've added the ability to directly import database dumps and file archives using the web interface. This gives people the ability to essentially re-run the import process any time they like for just the pieces they need. This feature is accessed in the same place as database/file downloads (see image right).

We've also added an option to "Wipe content" for an environment. This will clear out the database and files area completely, and can be extremely helpful for developers working on installation profiles. After running this option you'll be back to a fresh install.php when you load the site.

Power Tools for Power Users
For many developers, a terminal is better than any web UI. As part of the work to improve our data-hauling workflow in the control panel, we've also been improving our command-line features. We pre-generate Drush alias files for all your sites — grab this from your account screen, add your SSH key and you're cleared to Drush.

You can now use Drush to connect directly to import import/export your database and files. For instance, getting your sql credentials is as easy as:

drush @pantheon.my-site-name.dev sql-connect

That will give you access the database instance for that site/environment. You can use this to pull or push database dump files directly, or connect a local client, including GUI clients.

You can also now use the drush rsync command successfully:

drush rsync @pantheon.my-site-name.dev:sites/default/files/ ./local-files/

That will sync the remote files directory to your desktop. Reversing the arguments will do the reverse. When using rsync it's important to be careful to use that trailing slash or else you'll end up copying one directory into another, rather than syncing their contents.

There's more technical documentation of these capabilities in the wiki, including how to use rsync directly if you prefer. If you are truly savvy, you can even make an SFTP connection to transfer files!

We'll be expanding and improving these features in the coming weeks, as well as providing more customized copy/paste snippits directly from the dashboard to get you Drushing in no time. Let us know what you think and what else you'd like to see.


Also, we do stuff like this all day and it's rad. If you're into this kind of work, we're hiring.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web