Answers.Body: <p>I would bet almost 100% that you're using drush 7 or higher.  The function <code>drush_sql_dump_execute</code> doesn't exist in drush 7.  Support for drush 7 was added as of CiviCRM 4.5.5 - see <a href="https://issues.civicrm.org/jira/browse/CRM-15567" rel="nofollow noreferrer">CRM-15567</a>.</p>
  
  <p>That link suggests that drush 6 has the same problem.  I would recommend using <code>mysqldump</code> until you're upgraded.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-02T17:52:15.353Z
Answers.Text: The command I used was drush civicrm-sql-dump. I got that command from the list of available Drush CiviCRM commands. Wouldn't drush only list the commands that are available with the versions of Drush and CiviCRM that I am running?
Answers.UserDisplayName: Christia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-03T15:29:34.383Z
Answers.Text: I'm afraid drush isn't that clever, sorry!
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-01T15:42:07.547Z
Answers.LastActivityDate: 2016-11-01T15:42:07.547Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>I ended up being able to take a backup with the mysqldump command instead, but still wonder why Drush didn't work for it.</p>
  
  <pre><code>mysqldump -u -p database_name &gt; backup_name.sql
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-01T06:07:02.753Z
Answers.LastActivityDate: 2016-11-01T06:07:02.753Z
Answers.UserDisplayName: Christia
Body: <p>I am running Drupal 7.37 and CiviCRM 4.3.8. I am in the process of upgrading both, but currently get an error when manually creating a backup of the CiviCRM database. All regularly occurring daily backups are fine. </p>
  
  <p>I used this command:</p>
  
  <pre><code>root@web:/path/to/docroot# drush civicrm-sql-dump &gt; ../civicrmdatabase-backup1610312230.sql
  </code></pre>
  
  <p>Which returned:</p>
  
  <pre><code>PHP Fatal error:  Call to undefined function drush_sql_dump_execute() in /var/www/html/civicrm/v4.3.8-d7/drupal/drush/civicrm.drush.inc on line 959
  Drush command terminated abnormally due to an unrecoverable error. Error: Call to undefined function drush_sql_dump_execute() in /var/www/html/civicrm/v4.3.8-d7/drupal/drush/civicrm.drush.inc, line 959
  </code></pre>
  
  <p>It may be helpful to know that I am using a symlink from the Drupal modules folder to the civicrm install folder for now. Any insight into this error or an alternative to taking an immediate backup without installing anything would be appreciated, thanks!</p>
  
Tags: <error><drush><backups>
Title: Error Backing Up Database using drush: Call to undefined function drush_sql_dump_execute()
ThreadText: # Error Backing Up Database using drush: Call to undefined function drush_sql_dump_execute()
  
  (Asked by: username_0 on 2016-11-01)
  
  I am running Drupal 7.37 and CiviCRM 4.3.8. I am in the process of upgrading both, but currently get an error when manually creating a backup of the CiviCRM database. All regularly occurring daily backups are fine.
  
  I used this command:
  
  ```
  root@web:/path/to/docroot# drush civicrm-sql-dump > ../civicrmdatabase-backup1610312230.sql
  
  ```
  
  Which returned:
  
  ```
  PHP Fatal error:  Call to undefined function drush_sql_dump_execute() in /var/www/html/civicrm/v4.3.8-d7/drupal/drush/civicrm.drush.inc on line 959
  Drush command terminated abnormally due to an unrecoverable error. Error: Call to undefined function drush_sql_dump_execute() in /var/www/html/civicrm/v4.3.8-d7/drupal/drush/civicrm.drush.inc, line 959
  
  ```
  
  It may be helpful to know that I am using a symlink from the Drupal modules folder to the civicrm install folder for now. Any insight into this error or an alternative to taking an immediate backup without installing anything would be appreciated, thanks!
  
  **Tags:** error, drush, backups
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-11-01. Score: 2 | Accepted answer
  
  I would bet almost 100% that you're using drush 7 or higher. The function `drush_sql_dump_execute` doesn't exist in drush 7. Support for drush 7 was added as of CiviCRM 4.5.5 - see [CRM-15567](https://issues.civicrm.org/jira/browse/CRM-15567).
  
  That link suggests that drush 6 has the same problem. I would recommend using `mysqldump` until you're upgraded.
  
  > **Comments:**
  > **username_0**: The command I used was drush civicrm-sql-dump. I got that command from the list of available Drush CiviCRM commands. Wouldn't drush only list the commands that are available with the versions of Drush and CiviCRM that I am running?  
  > **username_1**: I'm afraid drush isn't that clever, sorry!  
  
  ---
  
  ### Answer by username_0 on 2016-11-01. Score: 1
  
  I ended up being able to take a backup with the mysqldump command instead, but still wonder why Drush didn't work for it.
  
  ```
  mysqldump -u -p database_name > backup_name.sql
  
  ```
  
  
  ---
  
  