SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Mysql Dump via Crontab

  1. #1
    SitePoint Addict
    Join Date
    May 2007
    Location
    Montreal
    Posts
    396
    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
    Do. Or do not. There is no try silver trophy
    SitePoint Award Recipient ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    8,343
    Mentioned
    87 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
  •