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:
results:
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 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,