src/Tasks.php
private function downloadPantheonBackup($env) {
    $project_properties = $this->getProjectProperties();
    $terminus_site_env  = $this->getPantheonSiteEnv($env);

    $terminus_url_request = $this->taskExec('terminus backup:get ' . $terminus_site_env . ' --element="db"')
      ->dir($project_properties['web_root'])
      ->interactive(false)
      ->run();

    if ($terminus_url_request->wasSuccessful()) {
      $terminus_url = $terminus_url_request->getMessage();
    }
    else {
      $this->yell('Failed to find a recent backup for the ' . $terminus_site_env . ' site. Does one exist?');
      return FALSE;
    }

    $wget_database = $this->taskExec('wget -O vendor/database.sql.gz "' . trim($terminus_url) . '"')->run();

    if (!$wget_database->wasSuccessful()) {
      $this->yell('Remote database sync failed.');
      return FALSE;
    }

    return TRUE;
  }
private function downloadPantheonBackup($env) {
    $project_properties = $this->getProjectProperties();
    $terminus_site_env  = $this->getPantheonSiteEnv($env);

    $terminus_url_request = $this->taskExec('terminus backup:get ' . $terminus_site_env . ' --element="db"')
      ->dir($project_properties['web_root'])
      ->interactive(false)
      ->run();

    if ($terminus_url_request->wasSuccessful()) {
      $terminus_url = $terminus_url_request->getMessage();
    }
    else {
      $this->yell('Failed to find a recent backup for the ' . $terminus_site_env . ' site. Does one exist?');
      return FALSE;
    }

    $wget_database = $this->taskExec('wget -O vendor/database.sql.gz "' . trim($terminus_url) . '"')->run();

    if (!$wget_database->wasSuccessful()) {
      $this->yell('Remote database sync failed.');
      return FALSE;
    }

    return TRUE;
  }
private function downloadPantheonBackup ( $ env ) { $ project_properties = $ this -> getProjectProperties ( ) ; $ terminus_site_env = $ this -> getPantheonSiteEnv ( $ env ) ; $ terminus_url_request = $ this -> taskExec ( 'terminus backup:get ' . $ terminus_site_env . ' --element="db"' ) -> dir ( $ project_properties [ 'web_root' ] ) -> interactive ( false ) -> run ( ) ; if ( $ terminus_url_request -> wasSuccessful ( ) ) { $ terminus_url = $ terminus_url_request -> getMessage ( ) ; } else { $ this -> yell ( 'Failed to find a recent backup for the ' . $ terminus_site_env . ' site. Does one exist?' ) ; return FALSE ; } $ wget_database = $ this -> taskExec ( 'wget -O vendor/database.sql.gz "' . trim ( $ terminus_url ) . '"' ) -> run ( ) ; if ( ! $ wget_database -> wasSuccessful ( ) ) { $ this -> yell ( 'Remote database sync failed.' ) ; return FALSE ; } return TRUE ; }
Grabs a backup from Pantheon.

@param $env
The environemnt to get the backup from.

@return bool
True if the backup was downloaded.
Grabs a backup from Pantheon .