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' => 'http://build2be.dev',  'root' => '/Users/clemens/Sites/build2be.dev/www/',
  'path-aliases' => array(
    '%dump-dir' => '/Users/clemens/Sites/build2be.dev/store',
    '%files' => '/Users/clemens/Sites/build2be.dev/www/sites/build2be.dev/files',
  ),
);

Now we can run

drush rsync @b2b.prd @b2b.dev

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/build2be.dev otherwise drush cannot sql-sync. (I should try to add the db settings to the aliasses file.)

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

Now grab the remote db contents with

drush sql-sync @b2b.prd @b2b.dev

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

Enter your site by magic through uli.

drush @b2b.dev uli

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

Drush rocks.