From: Terri K. <ne...@fa...> - 2008-08-30 01:33:48
|
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 |
From: Ryan M. <rya...@2e...> - 2008-08-30 01:39:29
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> First off, look into using the automysqlbackup.sh script (<a class="moz-txt-link-freetext" href="http://sourceforge.net/projects/automysqlbackup/">http://sourceforge.net/projects/automysqlbackup/</a>). That will make backup simpler. Then just call the script from the dumppreusercmd.<br> <br> $sshPath -q -x -l backuppc $host /usr/bin/sudo /path/to/automysqlbackup.sh<br> <br> <br> Of course with the example above you'll have to add a line to sudoers such as:<br> <br> backuppc ALL=NOPASSWD: /path/to/automysqlbackup.sh<br> <br> <br> 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. <pre class="moz-signature" cols="72"> Ryan Manikowski System Administrator 2ergo Americas Inc. :703.677.8499: <a class="moz-txt-link-abbreviated" href="http://www.2ergo.com">www.2ergo.com</a> 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. </pre> <br> <br> Terri Kelley wrote: <blockquote cite="mid:614...@fa..." type="cite">I am trying to get the mysqldump to work. In the DumpPreUserCmd, I have <span class="Apple-style-span" style="border-collapse: collapse; font-family: courier; font-size: 13px; white-space: pre;">/usr/bin/mysqldump --add-drop-table -A -Q -u root > /home/backuppc/test/mysql.sql</span> <div><font class="Apple-style-span" face="courier" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre;">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.</span></font></div> <div><font class="Apple-style-span" face="courier" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre;">Full backup etc does work via rsync. Both are current Centos boxes. and latest of BackupPC.</span></font></div> <div><font class="Apple-style-span" face="courier" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre;"><br> </span></font></div> <div><font class="Apple-style-span" face="courier" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre;">Can anyone give me some pointers?</span></font></div> <div><font class="Apple-style-span" face="courier" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre;"><br> </span></font> <div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"> <div>tk</div> </span></span></span></span></span></span></span></div> </div> <pre wrap=""> <hr size="4" width="90%"> ------------------------------------------------------------------------- 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 <a class="moz-txt-link-freetext" href="http://moblin-contest.org/redirect.php?banner_id=100&url=/">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a></pre> <pre wrap=""> <hr size="4" width="90%"> _______________________________________________ BackupPC-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Bac...@li...">Bac...@li...</a> List: <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/backuppc-users">https://lists.sourceforge.net/lists/listinfo/backuppc-users</a> Wiki: <a class="moz-txt-link-freetext" href="http://backuppc.wiki.sourceforge.net">http://backuppc.wiki.sourceforge.net</a> Project: <a class="moz-txt-link-freetext" href="http://backuppc.sourceforge.net/">http://backuppc.sourceforge.net/</a> </pre> </blockquote> </body> </html> |
From: Terri K. <ne...@fa...> - 2008-08-30 02:54:56
|
On Aug 29, 2008, at 8:39 PM, Ryan Manikowski wrote: > First off, look into using the automysqlbackup.sh script (http://sourceforge.net/projects/automysqlbackup/ > ). 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 > > Ryan Manikowski Ryan, This works very nicely. Thanks so much for the response. tk |
From: Holger P. <wb...@pa...> - 2008-08-30 14:08:51
|
Hi, Terri Kelley wrote on 2008-08-29 20:33:21 -0500 [[BackupPC-users] mysqldump]: > 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 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 |