Installation

cannot backup database with wwmysqldump

Re: cannot backup database with wwmysqldump

by Danny Glin -
Number of replies: 0
The HOME variable should be set to the home directory of the user who is running the command, not the directory where you want the backups to be saved. This is where the script looks for configuration files (in this case, .my.cnf in particular). Also, it's a bad idea to use ~ for paths if you plan to run the script using cron, since this isn't necessarily set when cron is run.

For your version of the wwmysqldump script, you should change the second line to
HOME=/home/wwadmin
(assuming that that is the correct home directory for wwadmin), then it should be able to dump the database without a password. The way you have it now, it will dump it to the screen. Once you have this working you can change the third line to
mysqldump --opt webwork > /home/wwadmin/downloads
(assuming /home/wwadmin/backups is where you want the backups to go).