• Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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