skip to Main Content

I have a problem with the problem with syntax of a cronjob in plesk 12.5 , I use the following syntax in plesk 12.0 and it runs fine, however in plesk 12.5 it won’t work.

mysqldump -u user -ppassword database | gzip > /var/www/vhosts/domain.com/backupmysql/backup$( date +"%Y_%m_%d_%H_%M" ).sql.gz

can anybody help me with the correct syntac for plesk 12.5

2

Answers


  1. Try to use

    /usr/bin/mysqldump -u user -ppassword database | gzip > /var/www/vhosts/domain.com/backupmysql/backup$( date +”%Y_%m_%d_%H_%M” ).sql.gz

    At least command like

    /usr/bin/mysqldump -uadmin -pcat /etc/psa/.psa.shadow psa | gzip > /var/www/vhosts/domain.com/backup$( date +”%Y_%m_%d_%H_%M” ).sql.gz

    works like a charm.

    Login or Signup to reply.
  2. date: command not found -: date: command not found

    Make sure that you have /bin/date installed, it is part of coreutils package.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search