1

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!

2

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.

That link suggests that drush 6 has the same problem. I would recommend using mysqldump until you're upgraded.

  • 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? – Christia Nov 2 '16 at 17:52
  • 1
    I'm afraid drush isn't that clever, sorry! – Jon G - Megaphone Tech Nov 3 '16 at 15:29
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.