I just installed the Aegir system on an Ubuntu server and have serveral sites up on different platforms. I did import some existing sites per these instructions. The sites work though I did have some issues with imagecache. The sites verified but when I try to do a backup of these imported sites from Aegir I see the following errors.
Could not generate database backup from mysqldump
An error occurred at function : drush_provision_mysql_pre_provision_backup
Deleted mysql dump from sites directory
An error occurred at function : drush_hosting_hosting_task
The imported sites were already on the same server and I did not create new databases. I used the exsiting ones. Not sure if there is an issue with the databases, drush, or what. I just installed Aegir last night so I am a newbie with it.
Comments
Comment #1
Anonymous (not verified) commentedHi there,
Is this issue limited to just sites that have been imported? i.e, do newly-created sites have successful Backup tasks, or do they all fail? This may help us identify if it's a) a general system problem executing the mysqldump (we do do some funky stuff with file descriptors to hide the password from being displayed)), or whether it's specific to the import process + backup.
Thanks!
Comment #2
kepford commentedIt is only happening on the imported sites. The clean sites built from Aegir such as Atrium and Managing News backup perfectly.
Comment #3
kepford commentedI think I have found the problem. Not sure if this is the proper solution but here is what I did.
I typically set up a new database user for each site. In the case of these imported sites the users were already in place but the backups weren't working. I changed the user to my aegir mysql user in the drushrc.php files and the sites backup properly now. I noticed that when I looked at some sites that were built from the Aegir gui they have a database user such as site_328 and a database like site_328.
Is using the mysql user aegir bad practice? Thanks
Comment #4
Anonymous (not verified) commentedIt shouldn't have to be the aegir mysql user: what I think is happening here is that somehow the existing user you have, doesn't have the right GRANT permissions to do a mysqldump? But that's strange, so I didn't bring it up.
You could try and manually do a mysqldump of an imported site using the 'real' database user/pass per the settings.php, from the commandline, and see if there is a more helpful error given to you (if any) ?
Comment #5
Anonymous (not verified) commentedI believe the issue here was solved over IRC and was traced to the existing db user's insufficient GRANT privileges. Hence why it only affected existing sites and not new sites provisioned by aegir. Closing
Comment #7
jacobson commentedFor future reference, mig5's post #5 is the problem I ran into also. The privileges recommended by the Drupal installation documentation for the database user do not include the ability to perform a database dump. So you need to give that user sufficient privileges to do a DB dump before you try a migrate, for example, which attempts a backup.
Comment #8
Carl Johan commented..and for future reference: mysql passwords containing funky characters (including but not limited to dollar signs, question marks, etc) do not play well with bash and seems to have been the cause of my problems as described in #1
solved by setting a new grant in mysql + updating the settings.php and drushrc.php files.
Comment #9
tema commentedReopen it. Have same problem with fresh installed Aegir and created site:
It's strange:
using password: NO, not so?Comment #10
tema commentedAfter some digging I suppose that my problem is here:
Could not open required defaults file: /dev/fd/3. Looks like it's already used or not writable. I'm running Debian Squeeze on VPS.Comment #11
tema commentedSolved. It's known virtual guest problem: http://superuser.com/questions/109913/debian-lenny-expects-udev-on-a-vps..., so here's wrong place for my issue.
A workaround is
sudo ln -s /proc/self/fd /dev/fdand corresponding script at/etc/init.dbut the question remains: is the best practice to transmit passwords through/dev/fd/3when it's absent on virtual hosting environment?Comment #12
tema commentedComment #14
gaëlgThanks tema. Can you be more precise ? What do you mean by "corresponding script at /etc/init.d" ? Did this workaround work well ? I face the same problem when triying to backup or migrate sites.
Comment #15
Anonymous (not verified) commentedJust because it's absent on your VPS doesn't mean you can't just install it (#11)
apt-get install udev
Comment #16
gaëlgThanks. Got this after install :
udev requires hotplug support, not started.I'm on Debian Squeeze. So I'm now trying to install and start hotplug. Shouldn't udev be mentioned in the requirements ?Comment #17
tema commented@GaëlG: My "corresponding script" is
/etc/init.d/fd-workaround.sh:Comment #18
gaëlgThanks. Actually my sysadmin came back and I asked him for help. We added some packages to make udev work on openvz virtual machines. It works like a charm now :)
Comment #19
rowbotony commentedHi, I had this problem with newly imported sites as well, this thread was the top result on Google in searching for "Could not generate database backup from mysqldump". My problem was with the site directory file permissions - I needed to
chmod u+w sites/my-imported-site-that-is-misbehaving, then the backup worked fine and Aegir could dump the sql to the site's home directory.--Tony