cancel
Showing results for 
Search instead for 
Did you mean: 

How to get /view main.cf through java console?

mokkan
Level 6
Certified

I don't have unix access to all the hosts, but I have java admin console access to VCS. How do I view the main.cf file usng java console? I need to take backup of  main.cf file.

 

Thanks in advance

4 ACCEPTED SOLUTIONS

Accepted Solutions

Gaurav_S
Moderator
Moderator
   VIP    Certified

Hi,

I have a Java cluster version 5.0.10.0 installed & There is no way to view a full main.cf using this version java console, you can print certain views from "File --> print" option but it doesn't give consolidated view of full main.cf. I did check notes for 6.0 however doesn't have anything to backup either.

About backing up main.cf ,you can set BackupInterval attribute in cluster to take automated backups

Scheduling automatic backups for VCS configuration files

Configure the BackupInterval attribute to instruct VCS to create a back up of the
configuration periodically. VCS backs up the main.cf and types.cf files as
main.cf.autobackup and types.cf.autobackup, respectively.
To start periodic backups of VCS configuration files
◆ Set the cluster-level attribute BackupInterval to a non-zero value.
For example, to back up the configuration every 5 minutes, set BackupInterval
to 5.
Example:
# haclus -display | grep BackupInterval
BackupInterval 0
# haconf -makerw
# haclus -modify BackupInterval 5
# haconf -dump -makero

 

G

 

View solution in original post

Marianne
Level 6
Partner    VIP    Accredited Certified

You will need to ask someone with logon access to the cluster nodes or else request access to the nodes.

What user name are you using for the cluster java console?
A cluster user name (e.g. admin) or OS user name?

View solution in original post

mikebounds
Level 6
Partner Accredited

Agree with Gaurav that you can't view main.cf from GUI and agree with Marianne that ideally you need to get login access to the nodes, however setting the BackupInterval is not going to help:

When you open the VCS config and make a change, this happens in memory, so if you don't save the change, it would be lost if the cluster went down, so setting BackupInterval, auto saves the config in the same way that Autosave works on a document you are writing, so this attribute ought to be called AutoSaveInterval, as using the word Backup is a bit misleading.  Also note that if you make a change to the config and save and close the VCS config, then regarldess of BackupInterval setting, VCS automatically makes a backup of the old version which it calls main.cf.timestamp.

 

If you cannot get login access to the system, then there is a work-a-round if you have access to ANY VCS system (including VCS on a different platform, even Windows) which is as follows:

  1. Set variable VCS_HOST to the IP that you use to connect to cluster in Java GUI (this can be the IP of one of the nodes or the ClusterService IP)
     
  2. Use "halogin vcs_user_name" for the user you use to access the Java GUI (and enter password)
     
  3. Use the following commands to give you all the attributes in the main.cf
    haclus -display
    hasys -display
    hagrp -display
    hares -display
     
  4. If you need a backup of types.cf as well then use
    hatype -display

If you output the contents of the above to a file, then this backups all the attributes, however it is not in a format that would be easy to restore - you would have to write a script, or manually enter the information contained in the output and therefore login access to the nodes is the ideal solution, but also the O/S should be periodically backed up automatically.

Mike

 

View solution in original post

Setu_Gupta
Level 3
Accredited

Add the following to the commands mentioned by Mike:

hares -dep
hagrp -dep

These commands provide the dependencies of resources and groups, respectively.

Thanks,
Setu.

View solution in original post

5 REPLIES 5

Gaurav_S
Moderator
Moderator
   VIP    Certified

Hi,

I have a Java cluster version 5.0.10.0 installed & There is no way to view a full main.cf using this version java console, you can print certain views from "File --> print" option but it doesn't give consolidated view of full main.cf. I did check notes for 6.0 however doesn't have anything to backup either.

About backing up main.cf ,you can set BackupInterval attribute in cluster to take automated backups

Scheduling automatic backups for VCS configuration files

Configure the BackupInterval attribute to instruct VCS to create a back up of the
configuration periodically. VCS backs up the main.cf and types.cf files as
main.cf.autobackup and types.cf.autobackup, respectively.
To start periodic backups of VCS configuration files
◆ Set the cluster-level attribute BackupInterval to a non-zero value.
For example, to back up the configuration every 5 minutes, set BackupInterval
to 5.
Example:
# haclus -display | grep BackupInterval
BackupInterval 0
# haconf -makerw
# haclus -modify BackupInterval 5
# haconf -dump -makero

 

G

 

Marianne
Level 6
Partner    VIP    Accredited Certified

You will need to ask someone with logon access to the cluster nodes or else request access to the nodes.

What user name are you using for the cluster java console?
A cluster user name (e.g. admin) or OS user name?

mikebounds
Level 6
Partner Accredited

Agree with Gaurav that you can't view main.cf from GUI and agree with Marianne that ideally you need to get login access to the nodes, however setting the BackupInterval is not going to help:

When you open the VCS config and make a change, this happens in memory, so if you don't save the change, it would be lost if the cluster went down, so setting BackupInterval, auto saves the config in the same way that Autosave works on a document you are writing, so this attribute ought to be called AutoSaveInterval, as using the word Backup is a bit misleading.  Also note that if you make a change to the config and save and close the VCS config, then regarldess of BackupInterval setting, VCS automatically makes a backup of the old version which it calls main.cf.timestamp.

 

If you cannot get login access to the system, then there is a work-a-round if you have access to ANY VCS system (including VCS on a different platform, even Windows) which is as follows:

  1. Set variable VCS_HOST to the IP that you use to connect to cluster in Java GUI (this can be the IP of one of the nodes or the ClusterService IP)
     
  2. Use "halogin vcs_user_name" for the user you use to access the Java GUI (and enter password)
     
  3. Use the following commands to give you all the attributes in the main.cf
    haclus -display
    hasys -display
    hagrp -display
    hares -display
     
  4. If you need a backup of types.cf as well then use
    hatype -display

If you output the contents of the above to a file, then this backups all the attributes, however it is not in a format that would be easy to restore - you would have to write a script, or manually enter the information contained in the output and therefore login access to the nodes is the ideal solution, but also the O/S should be periodically backed up automatically.

Mike

 

Setu_Gupta
Level 3
Accredited

Add the following to the commands mentioned by Mike:

hares -dep
hagrp -dep

These commands provide the dependencies of resources and groups, respectively.

Thanks,
Setu.

mokkan
Level 6
Certified

Thank you very much.