BEA Logo BEA WebLogic Enterprise Release 5.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WebLogic Enterprise Doc Home   |   Administration Topics   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Migrating Applications

 

This topic includes the following sections:

 


About Migration

Whether you need to migrate all or portions of an application, the changes to the application setup must be made with minimal service disruption. Machines, networks, databases, the BEA WebLogic Enterprise or BEA Tuxedo system, and the application all need to be maintained. The BEA WebLogic Enterprise and BEA Tuxedo systems provide a way to migrate the applications so that they can be serviced.

The BEA WebLogic Enterprise and BEA Tuxedo systems offer migration tools that can also be used to recover from a machine crash, network partitions, database corruptions, BEA WebLogic Enterprise or BEA Tuxedo system problems, and application faults.

 


Migration Options

The following is a list of migration options:

By using a combination of these options and partitioned network recovery utilities, you can migrate entire machines.

 


Switching Master and Backup Machines

Server migration is the process of moving one or more servers from one machine to another. One special instance of this process is the ability to switch master and backup machines. This type of switching is done by migrating the DBBL from the master machine to the backup machine. While this procedure is most frequently used when a network is partitioned, it is also useful in situations that require you to shut down the master machine.

Use the master command to switch the master machine.

Command

Description

master(m)

Switches the master machine to the backup machine or the reverse

Use the tmadmin(1) master (m) command to switch master and backup machines when the master machine must be shut down for maintenance, or when the master machine is no longer accessible. Switching master and backup machines, however, is only a first step. In most cases, application servers need to be migrated to alternate sites, or the master machine needs to be restored. (These tasks are described in this chapter.)

How to Switch the Master and Backup Machines

To switch the master and backup machines, call the tmadmin(1) command interpreter with the master (m) command from the backup machine.

Examples: Switching Master and Backup Machines

The following examples illustrate how you can switch master and backup machines.

In the first example (Listing 18-1), the master machine is accessible from the backup machine, and the DBBL process is migrated from the master machine to the backup machine.

Listing 18-1 When the Master Machine Is Accessible from the Backup Machine


$ tmadmin
tmadmin - Copyright © 1999 BEA. All rights reserved.
> master
are you sure? [y,n] y
Migrating active DBBL from SITE1 to SITE2, please wait...
DBBL has been migrated from SITE1 to SITE2
> q


In the second example (Listing 18-2), because the master machine is not accessible from the backup machine, the DBBL process is created on the backup machine.

Listing 18-2 When the Master Machine Is Not Accessible from the Backup Machine


$ tmadmin
> master
are you sure? [y,n] y
Creating new DBBL on SITE2, please wait... New DBBL created on SITE2
> q


 


Migrating a Server Group

Use the following two tmadmin commands to migrate servers.

Use This Command

To

migrategroup(migg)

Migrate servers in a group to their alternate location

migratemach(migm)

Migrate servers by using LMIDs

The tmadmin(1) migrategroup (migg) command takes the name of a single server group as an argument. You must first shut down the servers to be migrated with the -R option (for example, tmshutdown -R -g GROUP1).

You must specify an alternate location in the LMID parameter (for the server group being migrated) in the GROUPS section of the UBBCONFIG file. Servers in the group must specify RESTART=Y and the MIGRATE option must be specified in the RESOURCES section of the UBBCONFIG file.

If transactions are being logged for the server involved in a group migration, you may need to move the TLOG to the backup machine, load it, and perform a warm start.

Migrating a Server Group When the Alternate Machine Is Accessible from the Primary Machine

To migrate a server group when the alternate machine is accessible from the primary machine, complete the following steps.

  1. Call tmshutdown(1) from the master machine with the -R and -g (group_name) options.

  2. Run tmadmin(1) from the master machine.

  3. Call the migrategroup (migg) command with group_name as the argument.

  4. Migrate the transaction log, if necessary.

  5. Migrate the application data, if necessary.

Migrating a Server Group When the Alternate Machine Is Not Accessible from the Primary Machine

To migrate a server group when the alternate machine is not accessible from the primary machine, complete the following steps.

  1. Switch the master and backup machines, if necessary.

  2. Run tmadmin(1) from the alternate machine.

  3. Call the pclean (pcl) command with the primary machine as the argument.

  4. Call the migrategroup (migg) command with group_name as the argument.

  5. Call the tmboot(1) command to boot the server group.

Examples: Migrating a Server Group

Listing 18-3 and Listing 18-4 show how you can migrate a server group. In the first example, the alternate machine is accessible from the primary machine. In the second example, the alternate machine is not accessible from the primary machine.

Listing 18-3 When the Alternate Machine Is Accessible from the Primary Machine


$ tmshutdown -R -g GROUP1
Shutting down server processes...
Server ID = 1 Group ID = GROUP1 machine = SITE1: shutdown succeeded
1 process stopped.
$ tmadmin
> migg GROUP1
migg successfully completed
> q


Listing 18-4 When the Alternate Machine Is Not Accessible from the Primary Machine


$ tmadmin
> pclean SITE1
Cleaning the DBBL.
Pausing 10 seconds waiting for system to stabilize.
3 SITE1 servers removed from bulletin board
> migg GROUP1
migg successfully completed.
> boot -g GROUP1
Booting server processes ...
exec simpserv -A :
on SITE2 -> process id=22699 ... Started.
1 process started.
> q


 


Migrating Machines

Use the tmadmin(1) migratemach (migm) command to migrate all server groups from one machine to another when the primary machine must be shut down for maintenance or when the primary machine is no longer accessible.

The command takes one logical machine identifier as an argument. The LMID names the processor on which the server group(s) have been running. The alternate location must be the same for all server groups on the LMID. Servers on the LMID must specify RESTART=Y and the MIGRATE options must be specified in the RESOURCES section of the UBBCONFIG file. You must first shut down the server groups with the tmshutdown(1) -R option, and servers in the groups must be marked as restartable.

Migrating Machines When the Alternate Machine Is Accessible from the Primary Machine

To migrate a machine when the alternate machine is accessible from the primary machine, complete the following steps.

  1. Call tmshutdown(1) from the master machine with the -R and -l (primary_machine) options.

  2. Run tmadmin(1) from the master machine.

  3. Call the migratemach (migm) command with primary_machine as the argument.

  4. Migrate the transaction log, if necessary.

  5. Migrate the application data, if necessary.

Migrating Machines When the Alternate Machine Is Not Accessible from the Primary Machine

To migrate a machine when the alternate machine is not accessible from the primary machine, complete the following steps.

  1. Switch the master and backup machines, if necessary.

  2. Run tmadmin(1) from the alternate machine.

  3. Call the pclean (pcl) command with primary_machine as the argument.

  4. Call the migratemach (migm) command with primary_machine as the argument.

  5. Call the boot (b) command to boot the server groups.

Examples: Migrating a Machine

Listing 18-5 and Listing 18-6 illustrate how you can migrate server groups. In the first example, the alternate machine is accessible from the primary machine. In the second example, the alternate machine is not accessible from the primary machine.

Listing 18-5 When the Alternate Machine Is Accessible from the Primary Machine


$ tmshutdown -R -l SITE1
Shutting down server processes...
Server ID = 1 Group ID = GROUP1 machine = SITE1: shutdown
succeeded 1 process stopped.
$ tmadmin
> migm SITE1
migm successfully completed
> q


Listing 18-6 When the Alternate Machine Is Not Accessible from the Primary Machine


$ tmadmin
tmadmin - Copyright © 1987-1990 AT&T; 1991-1993 USL.
>pclean SITE1
Cleaning the DBBL.
Pausing 10 seconds waiting for system to stabilize.
3 SITE1 servers removed from bulletin board
> migm SITE1
migm successfully completed.
> boot -l SITE1
Booting server processes ...
exec simpserv -A :
on SITE2 -- process id=22782 ... Started.
1 process started.
>q


 


Canceling a Migration

You can cancel a migration after a shutdown occurs, but before using the migrate command, by using the -cancel option with the migrate command.

You can cancel a migration in the following ways:

Example: A Migration Cancellation

Listing 18-7 illustrates how a server group and a machine can be migrated between their respective primary and alternate machines.

Listing 18-7 Canceling a Server Group Migration for Server Group GROUP1


$tmadmin  
tmadmin - Copyright © 1987-1990 AT&T; 1991-1993 USL.
> psr -g GROUP1

a.out Name  Queue Name    Grp Name   ID RqDone Ld Done Current Service
---------- ---------- -------- -- ------ ------- ---------------
simpserv 00001.00001 GROUP1 1 - - (DEAD MIGRATING)
> psr -g GROUP1
TMADMIN_CAT:121: No such server
migg -cancel GROUP1
>boot -g GROUP1
Booting server processes...
exec simpserv -A:
on SITE1 ->process id_27636 ... Started. 1 process started.
> psr -g GROUP1

a.out Name  Queue Name    Grp Name   ID RqDone Ld Done Current Service
---------- ---------- -------- -- ------ ------- ---------------
simpserv 00001.00001 GROUP1 1 - - ( - )
> q


 


Migrating Transaction Logs to a Backup Machine

To migrate transactions logs to a backup machine, complete the following steps.

  1. Shut down the servers in all the groups that write to the log to stop additional writes to the log.

  2. Dump the TLOG into an ASCII file by running the following command:

    dumptlog [-z config] [-o offset] [-n name] [-g groupname]

    Note: The TLOG is specified by the config and offset arguments. Offset defaults to 0 and name defaults to TLOG. If the -g option is chosen, only those records for which the TMS from groupname is the coordinator are dumped.

  3. Copy filename to the backup machine.

  4. Use loadtlog -m machine ASCII_file to read the name of the ASCII file into the existing TLOG for the specified machine.

  5. Use logstart machine to force a warm start of the TLOG.
    (The information is read from the TLOG to create an entry in the transaction table in shared memory.)

  6. Migrate the servers to the backup machine.