Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 31st July 2006, 13:24
Dwalf Dwalf is offline
Junior Member
 
Join Date: Jul 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Noob Cronjob for shell account ibackup prob

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
HOST=`hostname`
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***@rsync.ibackup.com::ibackup/MONDAY > /var/www/web4/results.txt
echo -n ' [+] done'
sleep 2
cat /var/www/web4/results.txt | mail -s "IBACKUP COMPLETED on www.somedomain.co.uk" alerts@mydomain.com
rm -rf /var/www/web4/results.txt

********************************

Thank any help with this will be great


Regards
Dwalf
Reply With Quote
Sponsored Links
  #2  
Old 31st July 2006, 14:57
Dwalf Dwalf is offline
Junior Member
 
Join Date: Jul 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

Thanks
Dwalf
Reply With Quote
  #3  
Old 31st July 2006, 15:17
Dwalf Dwalf is offline
Junior Member
 
Join Date: Jul 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Cheers
Dwalf
Reply With Quote
  #4  
Old 1st August 2006, 12:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Have a look here: http://www.howtoforge.com/forums/showthread.php?t=5635
Either use full paths to the programs in your script, or put a PATH line at the beginning (line 2).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 1st August 2006, 14:17
Dwalf Dwalf is offline
Junior Member
 
Join Date: Jul 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by falko
Have a look here: http://www.howtoforge.com/forums/showthread.php?t=5635
Either use full paths to the programs in your script, or put a PATH line at the beginning (line 2).

Thanks That helps

Regards
Dwalf
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:10.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.