programthisweb Posted June 7, 2006 Posted June 7, 2006 (edited) Hello all, 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: >/bin/sh: /home/[site directory]/public_html/automysqlbackup.sh: /bin/bash : bad interpreter: No such file or directory It is set to run every night at midnight, and last night it didn't run at all. here is the configuration portion of the file: ># Username to access the MySQL server e.g. dbuser USERNAME=[my username] # Username to access the MySQL server e.g. password PASSWORD=[my password] # Host name (or IP address) of MySQL server e.g localhost DBHOST=localhost # List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3" DBNAMES="db_name_1 db_name_2 db_name_3" # Backup directory location e.g /backups BACKUPDIR="/home/[site directory]/backups" # Mail setup # What would you like to be mailed to you? # - log : send only log file # - files : send log file and sql files as attachments (see docs) # - stdout : will simply output the log to the screen if run manually. # - quiet : Only send logs if an error occurs to the MAILADDR. MAILCONTENT="log" # Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs]) MAXATTSIZE="4000" # Email Address to send mail to? (user@domain.com) MAILADDR="[my email address]" # ============================================================ # === ADVANCED OPTIONS ( Read the doc's below for details )=== #============================================================= # List of DBBNAMES for Monthly Backups. MDBNAMES="mysql $DBNAMES" # List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes) DBEXCLUDE="" # Include CREATE DATABASE in backup? CREATE_DATABASE=yes # Separate backup directory and file for each DB? (yes or no) SEPDIR=yes # Which day do you want weekly backups? (1 to 7 where 1 is Monday) DOWEEKLY=6 # Choose Compression type. (gzip or bzip2) COMP=gzip # Compress communications between backup server and MySQL server? COMMCOMP=no # Additionally keep a copy of the most recent backup in a seperate directory. LATEST=no # The maximum size of the buffer for client/server communication. e.g. 16MB (maximum is 1GB) MAX_ALLOWED_PACKET= # For connections to localhost. Sometimes the Unix socket file must be specified. SOCKET= # Command to run before backups (uncomment to use) #PREBACKUP="/etc/mysql-backup-pre" # Command run after backups (uncomment to use) #POSTBACKUP="/etc/mysql-backup-post" Anyone have any suggestions? note: 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? TIA Edited June 7, 2006 by programthisweb Quote
programthisweb Posted June 8, 2006 Author Posted June 8, 2006 also, here is the command I am using to run the cron job >/home/[username]/scripts/automysqlbackup.sh.2.5 note: i've tried moving the file outside my public_html directory into a scripts directory. it has CHMOD 777, as does the file. Quote
TCH-Don Posted June 8, 2006 Posted June 8, 2006 I don't know why your script stopped working, but in the config file # Backup directory location e.g /backups BACKUPDIR="/home/[site directory]/backups" make sure you put your cpanel name after /home/ # Backup directory location e.g /backups BACKUPDIR="/home/cpanelname/[site directory]/backups" unless that is what you mean by [site directory] Maybe delete the cron job and create it again. Quote
programthisweb Posted June 8, 2006 Author Posted June 8, 2006 # Backup directory location e.g /backupsBACKUPDIR="/home/[site directory]/backups" make sure you put your cpanel name after /home/ # Backup directory location e.g /backups BACKUPDIR="/home/cpanelname/[site directory]/backups" unless that is what you mean by [site directory] Maybe delete the cron job and create it again. 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. Quote
TCH-Don Posted June 8, 2006 Posted June 8, 2006 Then a help ticket seems like the next thing to try. Quote
programthisweb Posted June 8, 2006 Author Posted June 8, 2006 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? Quote
TCH-Tim Posted June 8, 2006 Posted June 8, 2006 Please PM me your ticket numbers if it hasn't been fixed yet. Quote
programthisweb Posted June 20, 2006 Author Posted June 20, 2006 Please PM me your ticket numbers if it hasn't been fixed yet. 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! Quote
TCH-Don Posted June 20, 2006 Posted June 20, 2006 also, here is the command I am using to run the cron job >/home/[username]/scripts/automysqlbackup.sh.2.5 note: i've tried moving the file outside my public_html directory into a scripts directory. it has CHMOD 777, as does the file. Try changing the file name to just automysqlbackup.sh mine is in the root folder ( /home/cpanelname/) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.