function drush_sql_dump_execute

6.x sql.drush.inc drush_sql_dump_execute()
3.x sql.drush.inc drush_sql_dump_execute()
4.x sql.drush.inc drush_sql_dump_execute()
5.x sql.drush.inc drush_sql_dump_execute()

Command callback. Outputs the entire Drupal database in SQL format using mysqldump.

1 string reference to 'drush_sql_dump_execute'
sql_drush_command in commands/sql/sql.drush.inc
Implementation of hook_drush_command().

File

commands/sql/sql.drush.inc, line 228
Drush sql commands

Code

function drush_sql_dump_execute() {
  drush_sql_bootstrap_further();
  list($exec, $file) = drush_sql_dump();
  // Avoid the php memory of the $output array in drush_shell_exec().
  if (!$return = drush_op_system($exec)) {
    if ($file) {
      drush_log(dt('Database dump saved to !path', array('!path' => $file)), 'success');
    }
  }
  else {
    return drush_set_error('DRUSH_SQL_DUMP_FAIL', 'Database dump failed');
  }
}