Sponsored Content
Operating Systems AIX Disabling cron after NIM restore Post 302923606 by kaelu26 on Monday 3rd of November 2014 07:26:31 PM
Old 11-03-2014
Quote:
Originally Posted by Don Cragun
So, since you know how to disable the cron after the restore has been completed, you must also know how to disable the cron at some other time. Use that knowledge to disable the cron before you start the restore instead of after the restore completes!
I can't do this, once you restored an AIX mksysb, cron is automatically started. This is the nim script resource that I run after the restore has completed in our DR box.

Code:
#!/bin/ksh
#  CUSTOMIZING SCRIPT to set the hostname, disable cron
#export LOGFILE=/`basename $0 .ksh`.$(date +%Y%m%d.%H%M.log)
#exec >${LOGFILE} 2>&1
#echo "\n===========\nStarting `basename $0` at `date`\n===========================\n"
# Change hostname
#chdev -l inet0 -a hostname=drserver
# Update /etc/inittab (but back it up first)
exec 1>/var/log/node_bosinst.log
exec 2>&1
cp /etc/inittab /etc/inittab.bak.$(date +%Y%m%d)
chitab "cron:23456789:off:/usr/sbin/cron"
refresh -s inetd
#echo "\n==============\nCompleting `basename $0` at `date`\n===================\n"
#exit 0




[QUOTE]
Quote:
Originally Posted by -=XrAy=-
Maybe a another Idea could be to exclude the crontabs directory or the specific file /var/spool/cron/crontabs in your backup script and install the needed crontabs from another directory (e.g. crontab /backup/crontabs/root).
Thanks Ron. This is actually my last resort on fixing this. I'm just thinking of any other way of disabling cron in the mksysb or right after the restore without any delay of running cron jobs that runs every minute.

Quote:
Originally Posted by gull04
Hi,

Depending on your version of AIX, the process can be a little different when it comes to starting and stopping the cron service. What version are you using?
7100-03-03-1415
 

10 More Discussions You Might Find Interesting

1. AIX

migrate NIM server through NIM installation

I try to migrate a NIM server from one server to another. I try to do a mksysb on NIM server restore the NIM server's mksysb to a client through NIM installation shutdown NIM server start newly installed client as NIM server Does anyone do this before? who can give me some suggestion? (1 Reply)
Discussion started by: yanzhang
1 Replies

2. AIX

How to backup and restore Linux uisng NIM.

Hi Friends, I've a hard question to ask. I have a NIM server running on AIX 5.3. Now my requirement is that , " From This NIM Server i would like to take the Image of Linux servers ". I mean that using NIM server i should be able to backup / restore the linux Servers. In Simple terms... (3 Replies)
Discussion started by: rdkumarj
3 Replies

3. AIX

NIM client mksysb restore

Can a NIM client mksysb restore be performed via NIM (smitty nim) without the NIM client machine having the NIM server's IP and hostname in its /etc/hosts file? (10 Replies)
Discussion started by: kah00na
10 Replies

4. AIX

Back up a client NIM from nim master

Hello everyone Im trying to backup a nim client from nim master but I got this message COMMAND STATUS Command: failed stdout: yes stderr: no Before command completion, additional instructions may appear below. 0042-001 nim:... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

5. AIX

Single file restore from NIM backup

Hi, I've recently implemented a NIM backup procedure for 2 virtual AIX5.3 environments running on a JS22 blade server. The images transfer to an old p620 box connected to some old SSA storage, each server backs up a mksysb and a savevg image. Now seeing as this method should be replacing our... (3 Replies)
Discussion started by: thinboyslim
3 Replies

6. AIX

VIO restore from NIM dosen't work

Hello guys I have been trying to restore a VIO server from NIM using the nim_resource.tar file created from the same VIO lpar. The restoration goes fine and after 99% I get the following error 0516-304 putlvodm: Unable to find device id 000b5f62263b70a50000000000000000 in the Device... (1 Reply)
Discussion started by: balaji_prk
1 Replies

7. Shell Programming and Scripting

Disabling and enabling the cron

Hi All, Please tell me what is command to disable and enable the cron in unix. Thanks in Advance. Regards, Sindu (5 Replies)
Discussion started by: indira_s
5 Replies

8. UNIX for Dummies Questions & Answers

How to Disabling cron for few hours each day

Hi Is there any way to disable cron adhoc ? I want to run a script for every one minute between 04 to 00 hours will the below serves my purpose ? 01 04-00 * * * <your script> (1 Reply)
Discussion started by: rakeshkumar
1 Replies

9. AIX

NIM Restore hangs at the start

Hello Gurus, I have a couple of questions, I'm trying to do a mksysb restore from backup and it has just hung at the start. RS/6000 Firmware Version TCP05287 (c) Copyright IBM Corp. 2000 All rights reserved. -------------------------------------------------------------------------------... (8 Replies)
Discussion started by: elcounto
8 Replies

10. AIX

Problem in communication nim client with nim master

Hello, I have an AIX6.1 machine which is a nim client to my nim master which is also AIX6.1 machine. I had some problem to perform an installation on my client using smit nim . i removed /etc/niminfo file in order to do the initialization again but when i run the command niminit -a name=client... (0 Replies)
Discussion started by: omonoiatis9
0 Replies
All times are GMT -4. The time now is 07:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy