Noob Cronjob for shell account ibackup prob

Discussion in 'Installation/Configuration' started by Dwalf, Jul 31, 2006.

  1. Dwalf

    Dwalf New Member

    Hi bit of a noob question.

    I have setup a cronjob for some ibackup scripts to run.
    Basicly it runs daily and backups online via rsync. When i run the script all works 100% and site backup is uploaded to ibackup and a email notification is sent. But it seems the cronjob never runs as i never see the uploaded files nor the email. It does work manualy. The script and cron is not root and setup with the shell account user

    here is the crontab -e settings

    10 3 * * 1 /var/www/web4/ibackup.mon
    10 3 * * 2 /var/www/web4/ibackup.tue
    10 3 * * 3 /var/www/web4/ibackup.wen
    10 3 * * 4 /var/www/web4/ibackup.thu
    10 3 * * 5 /var/www/web4/ibackup.fri
    10 3 * * 6 /var/www/web4/ibackup.sat
    10 3 * * 0 /var/www/web4/ibackup.sun


    and here is a script.

    #!/bin/bash -x
    DATE=`date +%d.%m.%Y`
    TIME=`date +%H:%M:%S`
    echo "backup of $HOST at $DATE $TIME"
    sleep 2
    echo ' [*] Dumping databases for sync'
    mysqldump -u web4_u1 --password=******* web4_db1 > /var/www/web4/backup/db1.sql
    tar zcf /var/www/web4/backup/db1.tgz /var/www/web4/backup/db1.sql
    rm -rf /var/www/web4/backup/db1.sql
    sleep 2
    echo ' [*] Sending to Ibackup all in ISPConfig Backup folder and site backup zip'
    export RSYNC_PASSWORD=******
    rsync -r -v -z -t /var/www/web4/backup ***username*** > /var/www/web4/results.txt
    echo -n ' [+] done'
    sleep 2
    cat /var/www/web4/results.txt | mail -s "IBACKUP COMPLETED on" [email protected]
    rm -rf /var/www/web4/results.txt


    Thank any help with this will be great
    :D :D :D

  2. Dwalf

    Dwalf New Member

    Never mind

    ;) I ended up using the root cron to run the scripts

    Still would be good to know why the users shell accounts did not work.

  3. Dwalf

    Dwalf New Member

    Root work fine

    OK tested and root work 100% but users shell accounts with crontab not working at all.

    Also i noticed i had to restart the cron service as below

    /etc/init.d/cron restart

    then it worked.

    My Version is Version: 2.2.3

    I also thought it may be a permission issue but i changed one script to

    chmod o+x script.file
    Still nothing

  4. falko

    falko Super Moderator ISPConfig Developer

  5. Dwalf

    Dwalf New Member

Share This Page