crontab entries deleted !!


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users crontab entries deleted !!
# 1  
Old 11-20-2002
crontab entries deleted !!

Hi all,

A friend of mine accidently erased all crontab entries by typing crontab -r.
Can anyone pls. help me on this.
Is it possible that a backup file is available other than files from the backup tape. Or is it retrievable ???

Thnx,
MK
minazk
# 2  
Old 11-20-2002
What OS?


(I doubt it will help but there are differences in OS's) Probably better off warming up that tape drive!
# 3  
Old 11-20-2002
My OS is HP-UX 11 .....

Regds,
Minaz
minazk
# 4  
Old 11-21-2002
You would need to restore from tape unless someone has saved the crontab entries to another file or have some type script collecting this type of info.
# 5  
Old 11-21-2002
Hey... Lucky ME !!!!

Another friend of mine had saved it in his directory.Restored it.. works fine now..

Thanx anyways !!

~MK
minazk
# 6  
Old 11-22-2002
If you have HPUX, I would strongly suggest making an Ignite tape at least 2x month. At work we all do this weekly, as a precaution for Disaster Recovery.

You can make tarballs and store them on your system for important files. However, if your system is down you can't get to those. So, make that tape as often as you can.

You can automate it in cron Here is a script that I use.

CRON ENTRY:
# This is to create Weekly IGNITE tape backups.
29 10 * * 5 /usr/local/bin/mkignite 2> /dev/console 1> /dev/console

****************cut here ***********************
# cat /usr/local/bin/mkignite
echo "Beginning Ignite Tape Creation" > /dev/console
echo "Rewinding Tape" > /dev/console
mt -f /dev/rmt/0mn rew # Make sure that tape is rewound

sleep 30

echo "Make recovery in progress" > /dev/console
/opt/ignite/bin/make_recovery -C -A -v -d /dev/rmt/0mn 2> /dev/console 1> /deve

echo `uname -n` "mkignite" > /tmp/ignite.comp
tail -2 /var/opt/ignite/logs/makrec.log1 >> /tmp/ignite.comp

mailx -s "Weekly tape backup" root < /tmp/ignite.comp
cp /tmp/ignite.comp /root/backups/ignite.comp.`date +%m%d%y`
**************cut here *************************

If you are already doing this great, but you must be concious of Disaster recovery. It is your responsibility as the SA.

Smilie
# 7  
Old 11-22-2002
Hey, thanx !!!

I'll take care in future.

Thanks to all

~MK
minazk
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to list all crontab entries?

Hi, 1. How can I list all the crontab entries of all system users (like root, adm, sys etc.) as we have multiple files like /etc/crontab , /var/spool/cron, /etc/cron.d, /etc/cron.daily, /etc/cron.hourly, /etc/cron.monthly etc. 2. How can I list all the crontab entries of ALL users on a... (1 Reply)
Discussion started by: prvnrk
1 Replies

2. UNIX for Dummies Questions & Answers

How to change crontab entries?

How to edit crontab entries . A job is scheduled as 35 15 * * * it.sh rahul_raj/hdhd i want to change it as 45 15 * * * it.sh rahul_raj/hdhd 1.crontab -e 2.shift+g ---go to last line .press enter.Press <i> . After this what should i do? (6 Replies)
Discussion started by: rafa_fed2
6 Replies

3. BSD

NetBSD Accidently deleted crontab for root

Someone can told me where from get the default crontab settings of root for NetBSD 6.0 please :) ### SOLVED ### The default crontab rules are in etc.tgz /var/cron/tabs/root # $NetBSD: crontab,v 1.15 2002/11/27 15:09:17 perry Exp $ # # /var/cron/tabs/root - root's crontab for NetBSD #... (0 Replies)
Discussion started by: batence
0 Replies

4. Shell Programming and Scripting

Make entries in crontab file

I have created a shell script "abcd.sh" and script should run after every 10 min., For that I will create below entry in the crontab file by using command crontab -e */10 * * * * /cdr/work/proc_raw/abcd.sh >> /dev/null 2>&1 I wish to know whether above entry is correct or I have to make entry... (2 Replies)
Discussion started by: Devesh5683
2 Replies

5. UNIX for Dummies Questions & Answers

Deleted the scripts in Crontab by mistake

hi, instead of typing crontab -e i gave crontab -r and hit enter. So i lost all my scripts. Is there any way to restore the deleted scripts? Please help me out Thanks Ajay (3 Replies)
Discussion started by: ajayakunuri
3 Replies

6. Shell Programming and Scripting

Who deleted crontab?

We are using SunOS 5.10 and Korn Shell. If we need to figure out who deleted our crontab file for a particular user what do we do. Thanks in Advance!! ---------- Post updated at 08:08 AM ---------- Previous update was at 07:19 AM ---------- Friends, Please help.... (5 Replies)
Discussion started by: mehimadri
5 Replies

7. Solaris

Duplicate crontab entries

hi guys. can someone tell me what will happen if there are two identical crontab entry for an application. For example 03 23 * * 1 /usr/vt/crondemo 03 23 * * 1 /usr/vt/crondemo will the file crondemo run twice, once or wont run at all?? (2 Replies)
Discussion started by: vikashtulsiyan
2 Replies

8. Shell Programming and Scripting

how to change crontab entries

Hi Friends, I need to change crontab entries in prod. $crontab -l -> using this i can see the entries only Plese tell me how to edit this crontab and how to change the entires Waiting for ...... Thanks In advance friends Krish. (2 Replies)
Discussion started by: kittusri9
2 Replies

9. Shell Programming and Scripting

script to extract crontab entries

Hi, I am wondering if anyone has got a script to extract information such as frequnecy, date, time, file, log file etc. from crontab and put in a csv or similar format. Thanks Raj (5 Replies)
Discussion started by: raj@au
5 Replies

10. UNIX for Dummies Questions & Answers

crontab deleted accidently

I issued crontab -r accidently instead of crontab -e..n the crontab file got deleted.. is there a way to retrive it?:-( thank you:( (3 Replies)
Discussion started by: unisam
3 Replies
Login or Register to Ask a Question