Need Help With Automysqlbackup.sh

liunx

Guest
Hello all,<br /><br />I need some help with my configuration of automysqlbackup.sh. It was working fine for several months until just a few weeks ago, and now it is giving me this error:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->/bin/sh: /home/[site directory]/public_html/automysqlbackup.sh: /bin/bash<br />: bad interpreter: No such file or directory<!--c2--></div><!--ec2--><br /><br />It is set to run every night at midnight, and last night it didn't run at all.<br /><br />here is the configuration portion of the file:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--># Username to access the MySQL server e.g. dbuser<br />USERNAME=[my username]<br /><br /># Username to access the MySQL server e.g. password<br />PASSWORD=[my password]<br /><br /># Host name (or IP address) of MySQL server e.g localhost<br />DBHOST=localhost<br /><br /># List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"<br />DBNAMES="db_name_1 db_name_2 db_name_3"<br /><br /># Backup directory location e.g /backups<br />BACKUPDIR="/home/[site directory]/backups"<br /><br /># Mail setup<br /># What would you like to be mailed to you?<br /># - log   : send only log file<br /># - files : send log file and sql files as attachments (see docs)<br /># - stdout : will simply output the log to the screen if run manually.<br /># - quiet : Only send logs if an error occurs to the MAILADDR.<br />MAILCONTENT="log"<br /><br /># Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])<br />MAXATTSIZE="4000"<br /><br /># Email Address to send mail to? ([email protected])<br />MAILADDR="[my email address]"<br /><br /><br /># ============================================================<br /># === ADVANCED OPTIONS ( Read the doc's below for details )===<br />#=============================================================<br /><br /># List of DBBNAMES for Monthly Backups.<br />MDBNAMES="mysql $DBNAMES"<br /><br /># List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes)<br />DBEXCLUDE=""<br /><br /># Include CREATE DATABASE in backup?<br />CREATE_DATABASE=yes<br /><br /># Separate backup directory and file for each DB? (yes or no)<br />SEPDIR=yes<br /><br /># Which day do you want weekly backups? (1 to 7 where 1 is Monday)<br />DOWEEKLY=6<br /><br /># Choose Compression type. (gzip or bzip2)<br />COMP=gzip<br /><br /># Compress communications between backup server and MySQL server?<br />COMMCOMP=no<br /><br /># Additionally keep a copy of the most recent backup in a seperate directory.<br />LATEST=no<br /><br />#  The maximum size of the buffer for client/server communication. e.g. 16MB (maximum is 1GB)<br />MAX_ALLOWED_PACKET=<br /><br />#  For connections to localhost. Sometimes the Unix socket file must be specified.<br />SOCKET=<br /><br /># Command to run before backups (uncomment to use)<br />#PREBACKUP="/etc/mysql-backup-pre"<br /><br /># Command run after backups (uncomment to use)<br />#POSTBACKUP="/etc/mysql-backup-post"<!--c2--></div><!--ec2--><br /><br />Anyone have any suggestions?<br /><br />note:<br />I don't have it set to 'all' databases b/c I was getting backups of every db on the server, even those that aren't mine. Do I need to put commas in between each db name in the DBNAMES array?<br /><br />TIA<!--content-->
also, here is the command I am using to run the cron job<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->/home/[username]/scripts/automysqlbackup.sh.2.5<!--c2--></div><!--ec2--><br /><br />note: i've tried moving the file outside my public_html directory into a scripts directory. it has CHMOD 777, as does the file.<!--content-->
I don't know why your script stopped working, but<br />in the config file<br /><br /># Backup directory location e.g /backups<br />BACKUPDIR="/home/[site directory]/backups"<br /><br />make sure you put your cpanel name after /home/<br /><br /># Backup directory location e.g /backups<br />BACKUPDIR="/home/<b>cpanelname</b>/[site directory]/backups"<br /><br />unless that is what you mean by [site directory]<br /><br /><br />Maybe delete the cron job and create it again.<!--content-->
<!--quoteo(post=182027:date=Jun 8 2006, 01:43 AM:name=TCH-Don)--><div class='quotetop'>QUOTE(TCH-Don @ Jun 8 2006, 01:43 AM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=182027"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec--># Backup directory location e.g /backups<br />BACKUPDIR="/home/[site directory]/backups"<br /><br />make sure you put your cpanel name after /home/<br /><br /># Backup directory location e.g /backups<br />BACKUPDIR="/home/<b>cpanelname</b>/[site directory]/backups"<br /><br />unless that is what you mean by [site directory]<br />Maybe delete the cron job and create it again.<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Thanks Don, yes that is what I mean by [site directory] - I couldn't think of "cpanel username" when I was writing this post. I have deleted the cron job several times and tried again to no avail. I am at a loss here.<!--content-->
Then a help ticket seems like the next thing to try.<!--content-->
I have sent in 3 separate help tickets, and each time the tech will run the backup, say it is working fine, and that's it. Still, the cron doesn't work. Could something be wrong with the cron system itself on server 97?<!--content-->
Please PM me your ticket numbers if it hasn't been fixed yet.<!--content-->
<!--quoteo(post=182118:date=Jun 8 2006, 02:24 PM:name=TCH-Tim)--><div class='quotetop'>QUOTE(TCH-Tim @ Jun 8 2006, 02:24 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=182118"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->Please PM me your ticket numbers if it hasn't been fixed yet.<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><br />Has anyone been able to determine what is wrong with my script? I hate having to manually backup every night b/c sometimes I forget!<!--content-->
<!--quoteo(post=182023:date=Jun 8 2006, 04:29 AM:name=programthisweb)--><div class='quotetop'>QUOTE(programthisweb @ Jun 8 2006, 04:29 AM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=182023"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->also, here is the command I am using to run the cron job<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->/home/[username]/scripts/automysqlbackup.sh.2.5<!--c2--></div><!--ec2--><br /><br />note: i've tried moving the file outside my public_html directory into a scripts directory. it has CHMOD 777, as does the file.<!--QuoteEnd--></div><!--QuoteEEnd--><br />Try changing the file name to just <b>automysqlbackup.sh</b><br />mine is in the root folder ( /home/cpanelname/)<!--content-->
 
Back
Top