Re: modify cron from mksysb




pinoy2ser@xxxxxxxxx wrote:
AIX / UNIX GURUS,

We will be performing our year D/R at the end of year...I will be using
my mksysb to restore the system however, i would like to comment out or
possibly rename the crontab for root and sybase. This way no jobs will
run after the restore.. Is possible to go back and changes in the
crontabs after the mksysb backup.

I don't feel comfortable in commenting out the jobs in cron prior the
the backup, so i plan to make the changes in the mksysb tape..

Thanks for your help
pinoy..

Two things you could do:

1) Copy all of your cron entries to saved files in another directory on
the mksysb and then zero them out so they have nothing to run. Example
for root user:

# This will list the crontab for current user to a file in /etc
crontab -l > /etc/crontab.root
# This will remove (zero out) the current crontab
crontab -r

After this is done, create your mksysb, then put the CRON jobs back in
place using:

crontab < /etc/crontab.root

You must do this as each individual user so you would need to log on as
sybase to save that one. (Otherwise you can copy and remove the files
from /var/spool/cron/crontabs)

2) Use the option to "exclude" certain files from the mksysb and tell
it not to back up the contents of /var/spool/cron/crontabs.

Naturally, this should ONLY be done for your test disaster recovery
mksysb backup. For the permanent mksysb, you will certainly want the
crontab entries to be there when you restore.

FYI - another tip for DR mksysb tapes. Most companies are changing
their passwords on a regular basis now. However, if you restore from
the mksysb made two months ago, you may not remember what the root
password was at that time. BEFORE creating the mksysb tape, you may
want to set the root password to a predetermined value and use that
every time you make the mksysb. In that way you do not have to store a
password with the tape or try to remember some cryptic combination of
letters, numbers and special characters.

Steve

.



Relevant Pages

  • Re: Problem restoring root crontab from a mksysb
    ... I'd advise you to either restore it to another name, ... Then do "crontab -f file_name". ... Problem restoring root crontab from a mksysb ... it is still a empty file. ...
    (AIX-L)
  • Re: modify cron from mksysb
    ... possibly rename the crontab for root and sybase. ... crontabs after the mksysb backup. ... FYI - another tip for DR mksysb tapes. ...
    (comp.unix.aix)
  • Re: 5.3 ML4 - mksysb restore - 0c45 on display (BUG?)
    ... That does not mean it will ignore flow control, ... mksysb I was trying to restore was the last straw before wiping a system ... Do the configiration thing on your serial console terminal or PC ...
    (AIX-L)
  • Re: couple of mksysb restore questions
    ... You can see more information on exactly what is happening in the mksysb if you ... couple of mksysb restore questions ... I don't think this is a tape block size issue. ... The mksysbs were created with a blocksize of 0. ...
    (AIX-L)
  • Re: couple of mksysb restore questions
    ... I'm restoring to the same system that the mksysb was created on -- ... tape, as well as off of CD, this happens with more than one mksysb tape ... but not necessarily at the exact same point in the restore. ... Are you simply booting from a mksysb tape and letting it install? ...
    (AIX-L)