• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

operate mysqldump through plesk schedule task

Noturns

Regular Pleskian
I was fiddling around with mysqldump commands but i cant seem to get those working in Scheduled Tasks. Although i use the plesk internal backups i would like to setup an off-site backup also which copies the db-export to a SFTP location.

I used a Scheduled Task with ROOT permission

example:
Code:
mysqldump -u username -p password --all-databases > db-export.sql

results:
Code:
Task "mysqldump -u username -p secret --all-databases > db-export.sql" completed with error in 2 seconds, output:

Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help

I also tried a Scheduled Task with MYSQL permission instead of ROOT permission, which resulted in "Permission denied" - which i found a bit odd....

I can run the command without problem through terminal as root/sudo.
How come this does not work in plesk as root?

As a workaround i tried to create a bash-file and execute that bash-file through scheduled tasks, but got the same result.

I tried a forum search on mysqldump and sheduled task, but could not find a solution. I feel this is maybe a rookie question. I look forward in reading your replies.

Best regards,
 
I had also problems and IgorG command works but only when I put Notify to Every time. If it is on Errors only it doesn't work. Maybe bug in Plesk?
 
Back
Top