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

What OS?

(I doubt it will help but there are differences in OS's) Probably better off warming up that tape drive!

My OS is HP-UX 11 .....

Regds,
Minaz

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.

Hey... Lucky ME !!!!

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

Thanx anyways !!

~MK

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.

:smiley:

Hey, thanx !!!

I'll take care in future.

Thanks to all

~MK