LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2012, 12:46 AM   #1
shubhamuddu
LQ Newbie
 
Registered: Jun 2012
Posts: 24

Rep: Reputation: Disabled
cronjab


Hello...

I scheduled backup scripts using cronjob as below but nothing is happening, no errrors even. Please suggest what changes required..?


0 1 * * 0 /bin/sh /home/orasup/scripts/rman_weekly_full_bkp.sh (full backup every Sunday at 01:00 am)
30 2 * * 2,4,6 /bin/sh /home/orasup/scripts/rman_daily_incr_bkp.sh (Incremental level 1 backup every Tuesday, Thursday, Saturday at 01:00 am)
0 3 * * 3,5 /bin/sh /home/orasup/scripts/rman_daily_cumulative_bkp.sh(Cumulative backup every Wednesday, Friday at 01:00 am)

Thanks in advance...
 
Old 08-18-2012, 12:54 AM   #2
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi
check out whether crond service is enabled and running !

[root@node01 ~]# service crond status
crond (pid 18896) is running...
[root@node01 ~]#
 
Old 08-18-2012, 03:05 AM   #3
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 341

Rep: Reputation: 83
Code:
0 1 * * 0 /bin/sh /home/orasup/scripts/rman_weekly_full_bkp.sh (full backup every Sunday at 01:00 am)
30 2 * * 2,4,6 /bin/sh /home/orasup/scripts/rman_daily_incr_bkp.sh (Incremental level 1 backup every Tuesday, Thursday, Saturday at 01:00 am)
0 3 * * 3,5 /bin/sh /home/orasup/scripts/rman_daily_cumulative_bkp.sh(Cumulative backup every Wednesday, Friday at 01:00 am)
1) Make sure you list the full paths to every script/executable within your backup shell scripts.
2) Remove the comments like (full backup every Sunday at 01:00 am) after the script, unless they are arguments, which I don't think is the case.
 
Old 08-18-2012, 07:11 AM   #4
shubhamuddu
LQ Newbie
 
Registered: Jun 2012
Posts: 24

Original Poster
Rep: Reputation: Disabled
Please look at the below output, i sceduled cronjob by the user other than root user.
Should it by root user only..? If not what settings can be done at other user promp..?

[root@prod ~]# service crond status
crond (pid 5046) is running....
[root@prod ~]# su - orasup
[orasup@prod ~]$ service crond status
-bash: service: command not found

[root@prod ~]# crontab -l
no crontab for root

[orasup@prod ~]$ crontab -l
# full backup every Sunday at 01:00 am
0 1 * * 0 /bin/sh /home/orasup/scripts/rman_weekly_full_bkp.sh
# Incremental level 1 backup every Tuesday, Thursday, Saturday at 01:00 am
30 2 * * 2,4,6 /bin/sh /home/orasup/scripts/rman_daily_incr_bkp.sh
# Cumulative backup every Wednesday, Friday at 01:00 am
0 3 * * 3,5 /bin/sh /home/orasup/scripts/rman_daily_cumulative_bkp.sh


Thanks...
 
Old 08-18-2012, 09:27 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
How do you know they're not running? During this kind of debugging phase you should probably be redirecting the output if each script into a log file so you can see what's happening.
Code:
0 1 * * 0 /bin/sh /home/orasup/scripts/rman_weekly_full_bkp.sh > /home/orasup/scripts/rman_weekly_full_bkp.out 2>&1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off




All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration