I'm trying to use cronjobs for my backup system.
But all execution get a infamous error:
I searched on google (Stack, forums, Debian, etc) and not solution for problem.
I put a test:
simple cron for run a bash with this
line cronjob
And not problem
Like run this...
Try cronjob
Any work.
All fail with 127 exit.
But all execution get a infamous error:
Code:
Jun 26 21:47:01 pro03 /USR/SBIN/CRON[687624]: (root) CMD (root ; cd /root/; sh /root/backup.sh 696 > /dev/null 2>&1)
Jun 26 21:47:03 pro03 /USR/SBIN/CRON[687622]: (CRON) error (grandchild #687624 failed with exit status 127)
I searched on google (Stack, forums, Debian, etc) and not solution for problem.
I put a test:
simple cron for run a bash with this
Code:
#!/bin/shecho "$(date +%Y%m%d) $1" > $(date +%Y%m%d%H%M).txt
line cronjob
Code:
*/1 * * * * sh /root/test.sh 300 > /dev/null 2>&1
And not problem
Like run this...
Code:
#!/bin/sh
umount /mnt/backups/
case $1 in
696 )
echo "Backup kvm696"
#kvm696 Dropbox 200GB
lvcreate -L10G -s -n /dev/saXXXX
....
Try cronjob
Code:
13 2 * * * root sh /root/backup.sh 300 > /dev/null 2>&1
13 2 * * * sh /root/backup.sh 300 > /dev/null 2>&1
13 2 * * * root ; cd /root/; sh /root/backup.sh 300 > /dev/null 2>&1
Any work.
All fail with 127 exit.