Menu

What am I doing wrong??

slanton
2007-08-20
2013-05-29
  • slanton

    slanton - 2007-08-20

    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??

     
    • slanton

      slanton - 2007-08-20

      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??

       
    • CopaceticOpus

      CopaceticOpus - 2007-08-20

      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)?

       
    • slanton

      slanton - 2007-08-20

      To tell the truth I don't know how to run a shell script! Off to google!

       
    • slanton

      slanton - 2007-08-21

      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?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.