I have made the following changes
# 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="all"
# Backup directory location e.g /backups
BACKUPDIR="backups"(I have created a directory in public_html called backups)
I saved the file as mbackup.sh and put it in the etc directory and then set up a cron to run every minute (to test) with *****home/(myusername)/etc/mbackup.sh.
However nothing is happening??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually I have started to get emails all saying
/bin/sh: home/ataahua/etc/mbackup.sh: No such file or directory.
So how do I figure out what the correct path is??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Make sure your directory begins with "/home" not just "home".
Make sure the user that cron is using to run the job has execute permissions on your script.
Depending on your cron setup, you may need to rename your script. I discovered that my system would skip over any cron scripts that had a period in the file name.
Can you run the script directly (not from cron)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK ..I can't figure out how to run a shell script..eg where do you type the commands. I couldn't find anything on google that sets out the basics. I don't seem to have a prompt to do this.
I put in the /home instead of home and got the following email
/bin/sh: /home/(my username)/etc/mbackup.sh: /bin/bash
: bad interpreter: No such file or directory
The only period I have in my filename is the mbackup.sh ...how could I rename this to get rid of the period?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have made the following changes
# 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="all"
# Backup directory location e.g /backups
BACKUPDIR="backups"(I have created a directory in public_html called backups)
I saved the file as mbackup.sh and put it in the etc directory and then set up a cron to run every minute (to test) with *****home/(myusername)/etc/mbackup.sh.
However nothing is happening??
Actually I have started to get emails all saying
/bin/sh: home/ataahua/etc/mbackup.sh: No such file or directory.
So how do I figure out what the correct path is??
Make sure your directory begins with "/home" not just "home".
Make sure the user that cron is using to run the job has execute permissions on your script.
Depending on your cron setup, you may need to rename your script. I discovered that my system would skip over any cron scripts that had a period in the file name.
Can you run the script directly (not from cron)?
To tell the truth I don't know how to run a shell script! Off to google!
OK ..I can't figure out how to run a shell script..eg where do you type the commands. I couldn't find anything on google that sets out the basics. I don't seem to have a prompt to do this.
I put in the /home instead of home and got the following email
/bin/sh: /home/(my username)/etc/mbackup.sh: /bin/bash
: bad interpreter: No such file or directory
The only period I have in my filename is the mbackup.sh ...how could I rename this to get rid of the period?