How to get that site on localhost?

drush logo

Make sure you have your drush aliases file setup properly. Below a snippet from my b2b.aliases.drushrc.php

$aliases['dev'] = array(
  'uri' => '',  'root' => '/Users/clemens/Sites/',
  'path-aliases' => array(
    '%dump-dir' => '/Users/clemens/Sites/',
    '%files' => '/Users/clemens/Sites/',

Now we can run

drush rsync @b2b.prd

Now you have a file tree from production. But that clone is not runnable yet as you need a local database. Create or copy a proper settings.php into ./sites/ otherwise drush cannot sql-sync. (I should try to add the db settings to the aliasses file.)

cp old/settings.php ./sites/
# vi ./sites/

Now grab the remote db contents with

drush sql-sync @b2b.prd

Make sure you read the warning carefully ... reversing the source and target is a little fatal.

Enter your site by magic through uli.

drush uli

then use the one time login ... etc voila.

Drush rocks.