According to the documentation in settings.php, $db_url may be an array. Backup does not backup the database in this case. A simple fix would be to use code similar to that found in includes/install.inc or includes/database.inc.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | functions.inc_.patch | 2.78 KB | jshuster@drupal.org |
Comments
Comment #1
jshuster@drupal.org commentedI've attached a patch that fixes this. It modifies the backup_database function to iterate through each database in $GLOBALS["db_url"], and dump each database to its own backup file.
In doing this, this patch changes $db_file to be an array of filenames, and also changes backup_files to delete multiple temp files, for each database.
This patch also runs the db_url's through the php rawurldecode function to decode any special characters that might be in the database name or password: see http://drupal.org/node/155446#comment-796416 for an explanation.
I used WinMerge to generate this patch -- I can't quite tell if I did this correctly. Let me know if this doesn't work -- I can try redoing this, or simply post a revised functions.inc file.
(Please check this carefully if you use it -- I've only tested this on sites with one and two databases, both declared in arrays.)
Comment #2
jshuster@drupal.org commented