• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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