src/Robo/Commands/Sync/SyncCommand.php
public function syncDb() {
    $local_alias = '@' . $this->getConfigValue('drush.aliases.local');
    $remote_alias = '@' . $this->getConfigValue('drush.aliases.remote');

    $task = $this->taskDrush()
      ->alias('')
      ->drush('cache-clear drush')
      ->drush('sql-sync')
      ->arg($remote_alias)
      ->arg($local_alias)
      ->option('--target-dump', sys_get_temp_dir() . '/tmp.target.sql.gz')
      ->option('structure-tables-key', 'lightweight')
      ->option('create-db');

    if ($this->getConfigValue('drush.sanitize')) {
      $task->drush('sql-sanitize');
    }

    $task->drush('cr');
    $task->drush('sqlq "TRUNCATE cache_entity"');

    $result = $task->run();

    return $result;
  }
public function syncDb() {
    $local_alias = '@' . $this->getConfigValue('drush.aliases.local');
    $remote_alias = '@' . $this->getConfigValue('drush.aliases.remote');

    $task = $this->taskDrush()
      ->alias('')
      ->drush('cache-clear drush')
      ->drush('sql-sync')
      ->arg($remote_alias)
      ->arg($local_alias)
      ->option('--target-dump', sys_get_temp_dir() . '/tmp.target.sql.gz')
      ->option('structure-tables-key', 'lightweight')
      ->option('create-db');

    if ($this->getConfigValue('drush.sanitize')) {
      $task->drush('sql-sanitize');
    }

    $task->drush('cr');
    $task->drush('sqlq "TRUNCATE cache_entity"');

    $result = $task->run();

    return $result;
  }
public function syncDb ( ) { $ local_alias = '@' . $ this -> getConfigValue ( 'drush.aliases.local' ) ; $ remote_alias = '@' . $ this -> getConfigValue ( 'drush.aliases.remote' ) ; $ task = $ this -> taskDrush ( ) -> alias ( '' ) -> drush ( 'cache-clear drush' ) -> drush ( 'sql-sync' ) -> arg ( $ remote_alias ) -> arg ( $ local_alias ) -> option ( '--target-dump' , sys_get_temp_dir ( ) . '/tmp.target.sql.gz' ) -> option ( 'structure-tables-key' , 'lightweight' ) -> option ( 'create-db' ) ; if ( $ this -> getConfigValue ( 'drush.sanitize' ) ) { $ task -> drush ( 'sql-sanitize' ) ; } $ task -> drush ( 'cr' ) ; $ task -> drush ( 'sqlq "TRUNCATE cache_entity"' ) ; $ result = $ task -> run ( ) ; return $ result ; }
Copies remote db to local db for default site.

@command drupal:sync:default:db

@aliases dsb drupal:sync:db sync:db
@validateDrushConfig
@executeInVm
Copies remote db to local db for default site .