GreenZone
Member
I've got mysql and Xenforo running inside of Docker containers, with mapped volumes to the main virtual private server (VPS).
I'm having issues in trying to use crontab in order to schedule daily database dumps from mysql.
If I'm on the main VPS, I can successfully manually run this command in order to run a shell script inside of the mySQL Docker container in order to do the backup:
If I place that same command into my crontab on the VPS, I can confirm via the system log (/var/log/syslog) that crontab is trying to initiate the command, but the command ends up not running.
The shell script being called inside of the Docker container has this within it:
I'll include two screenshots with step by step demos of what's going on.
Any ideas?
I'm having issues in trying to use crontab in order to schedule daily database dumps from mysql.
If I'm on the main VPS, I can successfully manually run this command in order to run a shell script inside of the mySQL Docker container in order to do the backup:
Code:
/usr/bin/docker exec -ti mysql sh -c "/var/lib/mysql/backups/xenforo_mysql_backup.sh"
If I place that same command into my crontab on the VPS, I can confirm via the system log (/var/log/syslog) that crontab is trying to initiate the command, but the command ends up not running.
The shell script being called inside of the Docker container has this within it:
Code:
/usr/bin/mysqldump --opt -uMyUser -pMyPassword xenforo > /var/lib/mysql/backups/xenforo_backup_$(/bin/date +%Y-%m-%d).sql
I'll include two screenshots with step by step demos of what's going on.
Any ideas?