AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  automate mksysb in cron using NIM server

    Posted Mon July 13, 2009 06:08 AM

    Originally posted by: apple08


    Dear AIX gurus,
    would like to seek your advice. Currently im manually run mksysb, can I automate using the cron. i tried to see the command on the nim administration for this mksysb capturing, but the command seem complicated. how do u in your environment? your advice would much appreciated and highly welcomed. Many thansk in advance.
    would appreciate can share the command and the NIM practicality in helping system admin to do mksysb in your environment. Thank you
    #AIX-Forum


  • 2.  Re: automate mksysb in cron using NIM server

    Posted Mon July 13, 2009 10:28 AM

    Originally posted by: SystemAdmin


    Hello

    can I automate using the cron?

    Yes I do not see any reason why not. Assuming you have the resources defined on your NIM server prior to running the cron job (machine, excludes etc)

    The command to run should be something like (probably from within a small script called by cron);

    
    nim -o define -t mksysb -a source=client_machine_name -a mk_image=yes /  -a server=master -a location=/path_to_image_location/filename.mksysb /  -a exclude_files=exclude_file_resource_name mksysb_resource_name
    


    I have used this command to manually create mksysb's several times,

    Hope you find this helps

    JP
    #AIX-Forum


  • 3.  Re: automate mksysb in cron using NIM server

    Posted Mon July 13, 2009 11:10 AM

    Originally posted by: apple08


    Dear Sir,
    Thank you10x. its indeed very helpful.
    -a exclude_files=exclude_file_resource_name mksysb_resource_name
    in what case i need to exclude files? Sir if i want to extend /tmp, how to add in the command. Sir, the resource_name is it refering to the backup client? i think the mksysb command and nim command is bit different right Sir.
    will try the command tomorrow when im in the office.

    Many thanks in advance.
    #AIX-Forum


  • 4.  Re: automate mksysb in cron using NIM server

    Posted Mon July 13, 2009 11:53 AM

    Originally posted by: apple08


    ohh forget, can i pipe the output into one file and send the status should the mksysb is successful or otherwise to one file or email?
    how to do this?
    would really appreciate your advice. Many thanks in advance
    #AIX-Forum


  • 5.  Re: automate mksysb in cron using NIM server

    Posted Mon July 13, 2009 12:12 PM

    Originally posted by: SystemAdmin


    Hello

    An Exclude file is a list of files which are defined in a flat text file (/etc/exclude.rootvg for the mksysb) that you do not which to be included within the mksysb image (e.g. temporary files, files not required perhaps in user home directories).

    To extend the /tmp directory (not sure you want to do this each time you take a mksysb...) use the 'chfs -a size=10M /tmp' for example to increase the /tmp fs by 10MB

    The resource_name is a generic label for this example, you would make your own label for the resource type you are creating. I label my mksysb resources hostname_yyyymmdd_mksysb.

    The command I outlined above creates the mksysb image and puts it in the location '/path_to_image_location/filename.mksysb'

    It is worth getting hold of a NIM administration manual (IBM Redbook) to help you out with understanding this.

    Try http://www.redbooks.ibm.com/abstracts/sg247296.html?Open

    Cheers

    JP
    #AIX-Forum


  • 6.  Re: automate mksysb in cron using NIM server

    Posted Tue July 14, 2009 05:07 AM

    Originally posted by: apple08


    Dear Sir,
    nim -o define -t mksysb -a source=serverA -a mk_image=yes /
    -a server=master -a location=/export/images/mksysb_serverA_140709 /
    mksysb_serverA_140709 >> /tmp/backuplog.txt
    #AIX-Forum