• No results found

Practices for Lesson 17: Overview Practices Overview

In document D80149GC11_ag_fti_LABS.pdf (Page 170-175)

In this practice, you back up a domain. You then restore from that backup.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practice 17-1: Backing Up and Restoring a Domain

Practice 17-1: Backing Up and Restoring a Domain

Overview

In this practice, you back up the domain. You stop servers and remove the existing domain directories from one of the hosts. You restore the domain from the backup and restart the servers on that machine to ensure the backup is working properly.

You also set up the domain to automatically back up the configuration when changes are made.

Assumptions

You completed “Practice 13-2: Configuring a Cluster Proxy.”

The administration server and the four servers in the dynamic cluster are currently running.

OHS is running.

Tasks

1. Lock the domain configuration by using the admin console.

a. On your gateway machine’s desktop, double-click on the Mozilla Firefox web browser icon.

b. In the web browser, enter the URL to the administration console:

http://host01.example.com:7001/console

c. On the console welcome page, enter the username as weblogic and password as Welcome1. Then click the Login button.

d. In the Change Center, click Lock & Edit.

Note: Although in the classroom, no other administrator will be making configuration changes to your domain, in the real world this step is recommended to keep other

administrators from making changes to the domain configuration while the backup is being created.

e. Minimize the web browser to use later.

2. Create a backup of the domain on host01.

Note: You are just backing up the domain.This is just one of the tasks you would perform in an online backup.

a. From your gateway machine, double-click the VNC Viewer - host01 icon on the desktop. You connect to host01 as the oracle user. The password is also oracle.

b. Open a Terminal window. Navigate to the directory that holds the domain:

/u01/domains/part1.

$> cd /u01/domains/part1 c. Create a backup of the domain.

$> tar –zcpvf /home/oracle/wlsadminbackup.tarz wlsadmin Note: The options are:

− z: Zip the archive

− c: Create archive

− p: Preserve file and directory permissions

− v: Verbose output

− f: File name

d. Minimize the VNC Viewer to use later.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practice 17-1: Backing Up and Restoring a Domain

3. Use the admin console to set up automatic domain configuration backups.

a. Return to the admin console.

b. In the Domain Structure, click on the domain, wlsadmin.

c. Ensure that the Configuration and General tabs are selected.

d. Scroll down and click Advanced.

e. Scroll down again and select Configuration Archive Enabled.

f. Set Archive Configuration Count to 5.

g. Click the Save button.

h. In the Change Center, click Activate Changes.

4. Make sure the cluster2 servers on host02 (machine2) are running.

a. In the Domain Structure, expand Environment and select Clusters.

b. In the Clusters table, select cluster2.

c. Click the Control tab.

d. Make sure the servers that run on machine2 are running. If not, select their check boxes, click Start. Then click Yes.

5. Stop all servers in the domain that are running on host01 (machine1).

a. In the Domain Structure, expand Environment and select Servers.

b. Click the Control tab.

c. Select the check box in front of any managed servers that are currently running on machine1 (which is host01). Click Shutdown > Force Shutdown Now. Then click Yes. Wait for a little while and refresh the web browser. Ensure that the State of the servers is SHUTDOWN.

d. Now, select the check box in front of the admin server. Click Shutdown > Force Shutdown Now. Then click Yes.

Note: Notice the message that you no longer have an administration console, because the admin server is shutting down.

e. Minimize the web browser to use later.

6. Find the Node Manager running on host01 and stop it.

Note: You want to stop Node Manager before removing its directory.

a. Return to the VNC Viewer for host01.

b. Find the Terminal window that is running Node Manager. Stop it by pressing Ctrl + C in the window. Do not close this Terminal window, you will use it later. Minimize it for now.

7. Simulate a “media failure” by renaming the domain directory. (You could delete it, but we will rename it, just in case the backup does not work.)

a. In the VNC Viewer for host01, open a new Terminal window. Rename the domain directory.

Note: The command is shown on two lines due to space limitations. Enter it on one line.

$> mv /u01/domains/part1/wlsadmin

/u01/domains/part1/wlsadminorig 8. Before restoring the domain on host01 and starting the admin server and some managed

servers, notice that the servers on host02 (machine2) continue to run.

a. Return to the web browser. Use it to access an application running on the two

remaining cluster2 servers, which are both running on machine2. You will access them

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practice 17-1: Backing Up and Restoring a Domain

through the OHS cluster proxy. Depending upon which practices you have completed, you may have the contacts, supplies, or timeoff applications to try. Their URLs are:

http://host01.example.com:7777/contacts http://host01.example.com:7777/supplies http://host01.example.com:7777/timeoff

b. Once you have successfully accessed an application, minimize the web browser to use later.

9. Restore the domain on host01 from the backup.

a. Return to the host01 VNC Viewer. Open a Terminal window. Navigate to the directory that contained the domain directory.

$> cd /u01/domains/part1 b. Restore the domain directory.

$> tar –zxpvf /home/oracle/wlsadminbackup.tarz Note: The options are:

− z: Unzip the archive

− x: Extract the archive

− p: Preserve file and directory permissions

− v: Verbose output

− f: File name

c. Close the Terminal window.

10. Restart the Node Manager on host01.

a. Still in the VNC Viewer of host01, find the Terminal window in which Node Manager was running. Use the up arrow to retrieve the last command entered. Start Node Manager again by entering the command: ./startNodeManager.sh.

b. Minimize this window.

11. Start the admin server.

a. Find the Terminal window in which the admin server was running. Use the up arrow to retrieve the last command entered. Start the admin server by entering that command:

./startWebLogic.sh

Note: If the window has been closed, open a new Terminal window, navigate to the domain directory and start the admin server.

$> cd /u01/domains/part1/wlsadmin

$> ./startWebLogic.sh

Note: Wait for the server to show it is in RUNNING mode.

b. Minimize the Terminal window.

c. Exit the VNC Viewer.

12. Log in to the admin console. Start the two managed servers in cluster2 that run on machine1 (and that use the domain directories just restored).

a. Return to the web browser and enter the URL to the administration console:

http://host01.example.com:7001/console

b. On the console welcome page, enter the username as weblogic and the password as Welcome1. Then click the Login button.

c. In the Domain Structure, expand Environment, and select Servers.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practice 17-1: Backing Up and Restoring a Domain

d. Click the Control tab.

e. Select the check box in front of the two managed servers in cluster2 that are on machine1 (which is host01).

Note: The servers are cluster2server-1 and cluster2server-3.

f. Click Start. Then click Yes.

g. Wait for a little while and refresh the web browser. Ensure the State of the servers is RUNNING.

Note: You have restored the “missing” domain files from a backup and restarted the servers running on that machine.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

In document D80149GC11_ag_fti_LABS.pdf (Page 170-175)