crontab+mysqldump nem fut centoson

Sziasztok,

egy idegesito hibaval szivok par napok ota, szejjel turtam a google-t soksok verziot kiprobaltam megse megy a mysqldump-om crontabbol. Ha a parancsot pontosan ugyanugy futattom parancssorbol, priman mukodik. Ha a crontabbol, a backup konyvtarba tesztkent, egy rm -rf /backup/* lefutottok priman mukodik.
A mysqldump a cronbol azonban nem. Cron log latja elvileg el is inditja (CMD) de SEMMI sem tortenik, se hiba uzi sesemmi.
crontab -l

48 14 * * * /usr/bin/mysqldump -uroot -pxxx --opt mingle -c | /bin/gzip -9 > /backup/mingle_$(date '+%Y%m%d').sql.gz

a cronlog pedig:
Mar 8 14:48:01 Tools1 crond[25585]: (root) CMD (/usr/bin/mysqldump -uroot -pxxxx --opt mingle -c | /bin/gzip -9 > /backup/mingle_$(date '+)

megis mi baja lehet? miert nem megy? merre nezzek korul meg?

koszi elore is
jack

Hozzászólások

probald 2 % jellel:

48 14 * * * /usr/bin/mysqldump -uroot -pxxx --opt mingle -c | /bin/gzip -9 > /backup/mingle_$(date '+%%Y%%m%%d').sql.gz

vagy igy:

48 14 * * * /usr/bin/mysqldump -uroot -pxxx --opt mingle -c | /bin/gzip -9 > /backup/mingle_$(date '+\%Y\%m\%d').sql.gz

Bocs mindenki, mar meg is oldodott kozben:))
szkriptbe berakom, akkor megy.. mondjuk azert erdekelne, miert igy van?

Szerintem is a szazalekjelek miatt nem ment, de nem duplazva kell escapelni, hanem backslash-sel, lasd

man 5 crontab

(Vixie cron):

The ``sixth'' field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the crontab file. Percent-signs (%) in the command, unless escaped with backslash (\), will be changed into newline characters, and all data after the first % will be sent to the command as standard input. There is no way to split a single command line onto multiple lines, like the shell's trailing "\".