Welcome! » Log In » Create A New Profile

mysqldump

Posted by Anonymous 
mysqldump
August 29, 2008 06:34PM
I am trying to get the mysqldump to work. In the DumpPreUserCmd, I have /usr/bin/mysqldump --add-drop-table -A -Q -u root > /home/backuppc/test/mysql.sqlI tried it with the -p and without both -u and -p. Still nothing. If I run the command on the host, it will do the dump.
Full backup etc does work via rsync. Both are current Centos boxes. and latest of BackupPC.

Can anyone give me some pointers?

tk
mysqldump
August 29, 2008 06:39PM
First off, look into using the automysqlbackup.sh script ([url=http://sourceforge.net/projects/automysqlbackup/]http://sourceforge.net/projects/automysqlbackup/[/url]). That will make backup simpler. Then just call the script from the dumppreusercmd.

$sshPath -q -x -l backuppc $host /usr/bin/sudo /path/to/automysqlbackup.sh

Of course with the example above you'll have to add a line to sudoers such as:

backuppc ALL=NOPASSWD: /path/to/automysqlbackup.sh

Optionally you can also enable UserCmdCheckStatus if you only want the backup to run if the sql backup is successful, or just force an exit status of 0 at the end of your sql backup script. [quote]
Ryan Manikowski

System Administrator
2ergo Americas Inc.

:703.677.8499:
[url=http://www.2ergo.com]www.2ergo.com[/url]
Arlington, VA

This message (including attachments) is confidential and may be legally privileged. The content and views expressed are those of the sender and not necessarily the 2ergo Group. If you are not the intended recipient, you must not disclose, copy or use any part of it. Please delete all copies immediately and notify the sender. 2ergo Americas Inc. was formerly known as Proteus Inc.
[/quote]

Terri Kelley wrote: [quote]I am trying to get the mysqldump to work. In the DumpPreUserCmd, I have /usr/bin/mysqldump --add-drop-table -A -Q -u root > /home/backuppc/test/mysql.sql I tried it with the -p and without both -u and -p. Still nothing. If I run the command on the host, it will do the dump.
Full backup etc does work via rsync. Both are current Centos boxes. and latest of BackupPC.

Can anyone give me some pointers?

tk

[quote]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
[url=http://moblin-contest.org/redirect.php?banner_id=100&url=/]http://moblin-contest.org/redirect.php?banner_id=100&url=/[/url]

_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net ([email]BackupPC-users < at > lists.sourceforge.net[/email])
List: [url=https://lists.sourceforge.net/lists/listinfo/backuppc-users]https://lists.sourceforge.net/lists/listinfo/backuppc-users[/url]
Wiki: [url=http://backuppc.wiki.sourceforge.net]http://backuppc.wiki.sourceforge.net[/url]
Project: [url=http://backuppc.sourceforge.net/]http://backuppc.sourceforge.net/[/url]
[/quote] [/quote]
mysqldump
August 29, 2008 07:55PM
On Aug 29, 2008, at 8:39 PM, Ryan Manikowski wrote:
[quote] First off, look into using the automysqlbackup.sh script ([url=http://sourceforge.net/projects/automysqlbackup/]http://sourceforge.net/projects/automysqlbackup/[/url]). That will make backup simpler. Then just call the script from the dumppreusercmd.

$sshPath -q -x -l backuppc $host /usr/bin/sudo /path/to/automysqlbackup.sh

Of course with the example above you'll have to add a line to sudoers such as:

backuppc ALL=NOPASSWD: /path/to/automysqlbackup.sh

[quote]Ryan Manikowski
[/quote]
[/quote]

Ryan,

This works very nicely. Thanks so much for the response.

tk
mysqldump
August 30, 2008 07:09AM
Hi,

Terri Kelley wrote on 2008-08-29 20:33:21 -0500 [[BackupPC-users] mysqldump]:
[quote]I am trying to get the mysqldump to work. In the DumpPreUserCmd, I
have /usr/bin/mysqldump --add-drop-table -A -Q -u root > /home/
backuppc/test/mysql.sql
[/quote]
for the archives: the important thing to note is that DumpPreUserCmd (as well
as DumpPostUserCmd, DumpPreShareCmd, and DumpPostShareCmd) are run on the
BackupPC server, so you need to add a mechanism to run it on the client
(usually ssh or ssh + sudo) if that is what you need.

Regards,
Holger

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
Sorry, only registered users may post in this forum.

Click here to login