SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    May 2007
    Location
    Montreal
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mysql Dump via Crontab

    Hi

    I have spent the past 4 hours trying to figure this out. I trying to do a database backup with crontab.

    I have got this to work from the command line but it doesnt work in the cron tab:

    PHP Code:
    mysqldump -u dbuser -h localhost -pass dbname gzip -> /var/www/vhosts/domain.com/httpdocs/backups/db`date +%m%d%y`.sql.gz 
    How can I place it in the cron tab section of Plesk to get it to work? What am I missing?

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,097
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Cron is probably unable to figure out where "mysqldump" is located, you should supply the full path.

    Use "whereis mysqldump" on the command line to see where it is located.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •