Author Topic: Back up configurations  (Read 3469 times)

robertpetersen

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Konweb.dk
Back up configurations
« on: January 01, 2009, 09:06:47 AM »
Hi all. I'm done with the danish "Sports club version" and Would like to make the back up function work. I get the error message
"Error while creating database backup. Check MYSQLDUMP_COMMAND constant."


I am not sure what to change here

define('MYSQLDUMP_COMMAND', 'mysqldump'); // For Windows: define('MYSQLDUMP_COMMAND', '"c:\Program Files\MySQL\MySQL Server 5.0\bin\mysqldump"');
define('DB_BACKUP_FILENAME', 'db.sql');
define('BACKUP_FOLDER',"tmp/backup");
define('BACKUP_TIME_LIMIT',"300");
define('BACKUP_FILENAME',"opengoo_backup.zip");

Happy new year.
Best Regards, Robert

chrisdo

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Back up configurations
« Reply #1 on: January 02, 2009, 03:30:00 PM »
Hi robert,

You have to edit this line:
Code: [Select]
define('MYSQLDUMP_COMMAND', 'mysqldump'); // For Windows: define('MYSQLDUMP_COMMAND', '"c:\Program Files\MySQL\MySQL Server 5.0\bin\mysqldump"');to the following:
Code: [Select]
define('MYSQLDUMP_COMMAND', '%YOUR PATH TO THE mysqldump executable%');
Are you running OpenGoo on a linux machine or a windows machine?

If you are using OpenGOo on a linux machine it's maybe /usr/bin/mysqldump
« Last Edit: January 02, 2009, 04:14:12 PM by chrisdo »

robertpetersen

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Konweb.dk
Re: Back up configurations
« Reply #2 on: January 04, 2009, 09:19:31 AM »
I was mailing my host  (I am on a linux server~phpMyAdmin - 2.8.2.4~ MySQL klientversion: 5.0.32)and got this answer:
use this:
/usr/bin/mysqldump

That did not work, then I tried the following lines:

/usr/bin/mysqldump
usr/bin/mysqldump
%usr/bin/mysqldump
/var/run/mysqld/mysqldump
/usr/share/mysql/english/mysqldump
/var/lib/mysql/mysqldump
/usr/mysqldump

Nothing works.. still the same error. I think i am doing something completly wrong, but I do not know what it is
Best Regards, Robert

chrisdo

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Back up configurations
« Reply #3 on: January 04, 2009, 09:32:22 AM »
Is it the same error? If the hoster says that it should be /usr/bin/mysqldump than it should work.

But I had another problem with backing up the database. Is your MySQL Server at localhost or at another location?

I had to edit this because my MySQL Server is not on the same machine.

robertpetersen

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Konweb.dk
Re: Back up configurations
« Reply #4 on: January 04, 2009, 09:48:35 AM »
Yes it is the same error.
Im not sure what u mean regarding to localhost.

My opengoo is installed at www.firedog.dk
The sql server is mysql.firebee.dk

Could you perhabs copy paste the excact line so I know to make the line? i mean is there any signs like %/ or just / or is there also / in the end of the line.. etc. Hope you understand what i mean here.
Best Regards, Robert

robertpetersen

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Konweb.dk
Re: Back up configurations
« Reply #5 on: January 05, 2009, 01:48:37 PM »
No one? anybody has a advice for me?
Best Regards, Robert

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Back up configurations
« Reply #6 on: January 06, 2009, 10:16:57 AM »
I haven't worked much with backups. If I have some time I'll try to look at the source code and try to guess what could be happening.

Anyone else?

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Back up configurations
« Reply #7 on: January 06, 2009, 10:59:46 AM »
It seems that OpenGoo is assuming that the database server is on localhost.

Try setting MYSQLDUMP_COMMAND as '/usr/bin/mysqldump -h mysql.firebee.dk'

If this works we'll fix this for next version.

werner.wuerfel

  • Sr. Member
  • ****
  • Posts: 319
    • View Profile
Re: Back up configurations
« Reply #8 on: January 07, 2009, 06:35:45 AM »
We have the same problem. Our provider told us mysqldump is in /usr/bin

But we are using webhosting, so in our /usr/bin are only a command subset without mysqldump.

In the script BackupController.class.php in line 150 opengoo use mysqldump with the exec-command.

We think that is the real reason for the backup problem.

Is there a way to use mysqldump in the php environment without the exec-command.

werner.wuerfel

  • Sr. Member
  • ****
  • Posts: 319
    • View Profile
Re: Back up configurations
« Reply #9 on: January 07, 2009, 10:38:04 AM »
After we turned the PHP safe_mode the problem was fixed and we can create a backup.

Now we have a new problem: The zip-file has as size of 16 MB and we are not able after download for a succesful unzip.

 

anything