Example: Migrating - Cloning a server group

The following examples demonstrate how to clone a server group in WAS V4.0 and V6.x:

  • wscp V4.0

    ServerGroup clone /ServerGroup:sg1/ -cloneAttrs {{Name newServer}} -node /Node:mynode/
    

  • wsadmin V6.x

    In the following example, the first command obtains the cluster ID, the second command obtains the node ID, and the last command creates a new member of an existing cluster:

    Jacl

    set cluster1 [$AdminConfig getid /ServerCluster:mycluster/]
    set n1 [$AdminConfig getid /Node:mynode/]
    $AdminConfig createClusterMember $cluster1 $n1 {{memberName newServer}}
    $AdminConfig save
    

    Jython

    cluster1 = AdminConfig.getid('/ServerCluster:mycluster/')
    n1 = AdminConfig.getid('/Node:mynode/')
    AdminConfig.createClusterMember(cluster1, n1, [['memberName', 'newServer']])
    AdminConfig.save()
    


 

See Also


Commands for the AdminConfig object