Closed Widmo closed 2 years ago
Could you paste your config please.
Or cleared: sed -e 's/#.*$//' -e '/^$/d' /etc/mysqldump-secure.conf DUMP_DIR="/backup/mysql/" DUMP_DIR_CHMOD="0700" DUMP_FILEPRE="$(date '+%Y-%m-%d')$(date '+%H-%M')__" DUMP_FILE_CHMOD="0400" MYSQL_CNF_FILE="/etc/mysqldump-secure.cnf" MYSQL_SSL_ENABLE=0 MYSQL_SSL_CA_PEM="/path/to/ca.pem" IGNORE="information_schema performance_schema" REQUIRE="mysql" MYSQL_OPTS="--opt --default-character-set=utf8 --events --triggers --routines --hex-blob --complete-insert --extended-insert --compress" MYSQL_OPTS_QUICK_MIN_SIZE=200 CONSISTENT_DUMP_ONLY_INNODB=1 CONSISTENT_DUMP_NO_INNODB=1 CONSISTENT_DUMP_MIXED_INNODB=1 LOG=2 LOG_FILE="/var/log/mysqldump-secure.log" LOG_CHMOD="0600" COMPRESS=1 COMPRESS_BIN="gzip" COMPRESS_ARG="-9 --stdout" COMPRESS_EXT="gz" ENCRYPT=0 OPENSSL_PUBKEY_PEM="/etc/mysqldump-secure.pub.pem" OPENSSL_ALGO_ARG="-aes256" ENABLE_SMIME_BUG_WARNING=1 DELETE=1 DELETE_METHOD="tmpreaper" DELETE_FORCE=0 DELETE_IF_OLDER=7d NAGIOS_LOG=0 NAGIOS_LOG_FILE="/var/log/mysqldump-secure.nagios.log" NAGIOS_LOG_CHMOD="0644" DUMP_FILE_INFO=0 TMP_DIR="/tmp"
Looks like /usr/sbin is not in your PATH in the cron environment.
Can you add the following to mysqldump-secure
(somewhere at the very top of the file)
and see if it works with that?
PATH="/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:${PATH}"
Now it works, thanks!
I tried to set the full path /usr/bin/tmpreaper, but the program is not allowed to set other values beyond the default two.
Yes, its pretty regarding its settings. I will add this and build a new version.
Running manually, everyting is ok Runing from cron: 0 7 * /usr/bin/mysqldump-secure --cron
Return error: [ERR] (RUN): 'tmpreaper' not found [ERR] (OPT): Deletion disabled [ERR] Finished with 1 error. (Backups done successfully)
tmpreaper is installed: whereis tmpreaper tmpreaper: /usr/sbin/tmpreaper /etc/tmpreaper.conf /usr/share/man/man8/tmpreaper.8.gz