dieterl
Goto Top

Crontab funktioniert nicht

Hi @ /32

ich habe ein crontab eingerichtet welches folgendermaßen aussieht:


SHELL=/bin/bash
PATH=/var/www/Backup-Script/
MAILTO=root
HOME=/

04 10 * * * /var/www/Backup-Script/backup.sh


Backup.sh sieht folgendermaßen aus:


mysqldump --user=root --password= 1234 > xyz.dump

tar cfvz html.tar.gz /var/www/html


Wenn ich nun die Backup.sh manuell starte funktioniert alles.
Über Cron geht’s leider nicht.


Log- aus

/var/spool/mail/root/

sagt:


/var/www/Backup-Script/backup.sh: line 1: mysqldump: command not found
/var/www/Backup-Script/backup.sh: line 3: tar: command not found


Vielen Dank!

Content-Key: 160352

Url: https://administrator.de/contentid/160352

Printed on: April 25, 2024 at 13:04 o'clock

Member: ChrisIO
ChrisIO Feb 08, 2011 at 10:03:26 (UTC)
Goto Top
Geb mal die kompletten Pfade zu mysqldump und tar an.

Das fällt mir zumindest als erstes auf.
Member: godlie
godlie Feb 08, 2011 at 14:09:05 (UTC)
Goto Top
Hallo,
dein shell script sollte so aussehen wie christo bereits gesagt hat:
/usr/bin/mysqldump --user=root --password= 1234 > /was/weis/ich/für/ein/Pfad/xyz.dump
/usr/bin/tar cfvz html.tar.gz /var/www/html

grüße