Can't backup database from table list
| Project: | Database Administration |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
If I try to backup tables by selecting checkboxes on /admin/database, then clicking the backup button, the backup settings page with throw me back to /admin/database and show the error "You must select the tables to backup."
I'm pretty sure this worked prior to the change to forms api. This problem may occur with the other buttons on /admin/database, though I haven't tested. Doing a backup by clicking the "backup" link when viewing a table still works, though.
Reproduction:
1) Go to /admin/database
2) Check a check box next to a table to select it for backup
3) Press the Backup button at the bottom of the page
4) Press Submit on the following page to start the backup
Expected result:
1) Backup begins
Actual result:
1) Drupal returns to /admin/database with the error "You must select the tables to backup."
Note: This makes it impossible to do a manual backup of all tables (in a timely fashion, anyway).

#1
since i've got my head wrapped around the dba code again, i might as well take a quick stab at fixing this.
#2
fixing this big requires my patch at http://drupal.org/node/154227 as a first step.
#3
Finally committed http://drupal.org/node/154227 so this can move forward. Should be relatively easy to fix this now.
#4
Actually, I don't have time to work on this immediately, so I'm unassigning myself. If anyone else can take a stab at a patch against the latest code in CVS, that'd be great. Thanks.
#5
I'm having a somewhat similar problem. Here's what I do (using Drupal 5):
1) Go to http://www.mysite.org/admin/build/database
2) Click 'select all' (to checkbox all the tables).
3) Click 'Backup' button, bringing me here http://www.mysite.org/admin/build/database/backup
4) It asks me to specify a name (which I do) as well as whether to 'Add DROP TABLE' (which I also do)
5) I then click the 'Backup Tables' button
It brings me here: http://www.mysite.org/index.php?q=admin/build/database/backup and then... nothing is displayed. It's not a white screen - all my columns and menus are visible, there's just this big white area where I imagine some kind of confirmation is supposed to go.
Has anyone experienced this? Does anyone know what may be wrong?
#6
@Memeshift: yup, same bug. There's something screwy with the menu callbacks for the various pages these forms send you to, causing the trouble. Once upon a time I figured it all out, but that was months ago. This module isn't my top priority, so the first step I took towards fixing the bugs (http://drupal.org/node/154227) languished for months, and now I don't remember the details. Sorry.
#7
So, I think I figured this out. This module gives me a headache, though.
The menu callback for the empty, drop, and backup operations is
dba_admin_tables_verify_op(). The selected operation goes to that callback, gets a confirm form, then comes *back* to that callback. However, because of theunset($_SESSION['dba_tables']);, there are now no tables selected and the selected operation can't be done. Commenting out that line seems to make stuff work, but then the session variable isn't cleaned up. I hope this can help someone come up with a better solution. The check and optimize operations work because they don't use the confirm form and don't return to the callback which has unset the table list.#8
Subscribing.