Granted I'm a newbie but pretty sure I've made the few settings correctly and just duplicated a cron job already successfully running in my host panel, subsittuing the name with "automysqlbackup.sh" which is at the root level.
Also created /etc/automysqlbackup/automysqlbackup.conf with the code copied from the START to END in the file. Left the advanced options as is. Also left the automysqlbackup.sh unchanged without removing or editing anything.
Set automysqlbackup.conf to:
### START CFG ###
# Username to access the MySQL server e.g. dbuser
USERNAME=DB USER NAME
# Password to access the MySQL server e.g. password
PASSWORD=DB PASSWORD
# Host name (or IP address) of MySQL server e.g localhost
DBHOST=DB HOST NAME
# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
DBNAMES="SINGLE DB"
# 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="quiet"
# Set the maximum allowed email size in k. (4000 = approx 5MB email )
MAXATTSIZE="4000"
# Email Address to send mail to? (user@domain.com)
MAILADDR="MY EMAIL"
The Cron jobs in my panel only send email when errors occur. In this case I get an email that doesn't really specify what's up but does spit back the entire contents of automysqlbackup.sh. When I put in "mydomain/automysqlbackup.sh" I get a save file dialogue with the same full file in the saved file result.
Nothing is in /backups folder.
Any clues? Seemed simple enough, DOH!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was not able to reproduce such an error. There is no routine that points out the contents of the script to mail. I guess it's something outside the scope of automysqlbackup, but nevertheless it looks interesting.
Could you give a few more informations, please:
What is your distribution?
Are there some logs (in /var/log/syslog or /var/log/messages) related to the execution of the script? If so, post them, please.
You're writing "When I put in "mydomain/automysqlbackup.sh"…"
Are you trying to configure a so called cronjob via php, thats running on some webspace without having root access to the servers operating system? This won't work because automysqlbackup is not written for running in such an environment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply, impressive support to go along with the elegant script.
Strangely the Logs showed nothing.
Current release.
When I said I put that in the URL it was a separate test, I did set up a Cron job but tried running it manually when I started having issues with the Cron job.
Right after sending to you I thought that it might be the case that I have to own the server rather then just have ownership of the domain/account. I have a shared account.
I went ahead and set up a mysqldump cron instead after researching and trying your script. Still served a great purpose in that it got me to a solution that until yesterday I had little understanding of so thanks for that.
Sorry for the Newbie stuff, hope I didn't bother you and thanks again for getting me their albeit indirectly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Granted I'm a newbie but pretty sure I've made the few settings correctly and just duplicated a cron job already successfully running in my host panel, subsittuing the name with "automysqlbackup.sh" which is at the root level.
Also created /etc/automysqlbackup/automysqlbackup.conf with the code copied from the START to END in the file. Left the advanced options as is. Also left the automysqlbackup.sh unchanged without removing or editing anything.
Set automysqlbackup.conf to:
### START CFG ###
# Username to access the MySQL server e.g. dbuser
USERNAME=DB USER NAME
# Password to access the MySQL server e.g. password
PASSWORD=DB PASSWORD
# Host name (or IP address) of MySQL server e.g localhost
DBHOST=DB HOST NAME
# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
DBNAMES="SINGLE DB"
# Backup directory location e.g /backups
BACKUPDIR="/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="quiet"
# Set the maximum allowed email size in k. (4000 = approx 5MB email )
MAXATTSIZE="4000"
# Email Address to send mail to? (user@domain.com)
MAILADDR="MY EMAIL"
The Cron jobs in my panel only send email when errors occur. In this case I get an email that doesn't really specify what's up but does spit back the entire contents of automysqlbackup.sh. When I put in "mydomain/automysqlbackup.sh" I get a save file dialogue with the same full file in the saved file result.
Nothing is in /backups folder.
Any clues? Seemed simple enough, DOH!
BTW, also tried entering the .conf information directly in the .sh file.
Hello Jeffey,
I was not able to reproduce such an error. There is no routine that points out the contents of the script to mail. I guess it's something outside the scope of automysqlbackup, but nevertheless it looks interesting.
Could you give a few more informations, please:
What is your distribution?
Are there some logs (in /var/log/syslog or /var/log/messages) related to the execution of the script? If so, post them, please.
You're writing "When I put in "mydomain/automysqlbackup.sh"…"
Are you trying to configure a so called cronjob via php, thats running on some webspace without having root access to the servers operating system? This won't work because automysqlbackup is not written for running in such an environment.
Thanks for the reply, impressive support to go along with the elegant script.
Strangely the Logs showed nothing.
Current release.
When I said I put that in the URL it was a separate test, I did set up a Cron job but tried running it manually when I started having issues with the Cron job.
Right after sending to you I thought that it might be the case that I have to own the server rather then just have ownership of the domain/account. I have a shared account.
I went ahead and set up a mysqldump cron instead after researching and trying your script. Still served a great purpose in that it got me to a solution that until yesterday I had little understanding of so thanks for that.
Sorry for the Newbie stuff, hope I didn't bother you and thanks again for getting me their albeit indirectly.