Oracle by Example brandingBacking Up and Restoring an Oracle Java Cloud Service Instance

Before You Begin

Purpose

This tutorial shows you how to configure automated backups for an Oracle Java Cloud Service instance, back up a service instance, and restore a service instance from a backup, including how to return the instance to service after restoring it.

Last Updated

May 2019, Release 19.2.2

Please note that Oracle develops its cloud services in an agile manner and makes rapid changes to meet our users' needs. Therefore this tutorial may not reflect all of the changes since the last update to this service. For the very latest information see What's New for Oracle Java Cloud Service.

Time to Complete

Approximately 45 minutes

Background

By backing up an Oracle Java Cloud Service instance, you can protect the service instance's software and data against loss if a failure occurs. By restoring a service instance from a backup, you can restore the service instance's software, configuration, and database to their state at the time of the backup.

You can configure automated backups for an Oracle Java Cloud Service instance to customize when the service instance is backed up and how backups are stored.

What Do You Need?

Before starting this tutorial, ensure you have:

  • Created an Oracle Java Cloud Service instance with backups enabled. The instructions in this tutorial assume you already have a service instance that you can back up and restore. If you don't have a service instance ready, see the Creating a Custom Oracle Java Cloud Service Instance tutorial for information about how to create one.
  • A secure shell (SSH) client:
    • If you are using the Linux or UNIX operating system, you can use the operating system's ssh command.
    • If you are using the Windows operating system, you require a third-party SSH client, such as WinSCP or PuTTY.
  • Downloaded the sample application benefits.war.

Configuring Automated Backups for a Service Instance

To minimize the disruption of automated backups on your service instance, you have decided that full backups will be performed on Wednesdays at 11 AM UTC, and incremental backups will be performed at the same time on the remaining days of the week. To conserve storage resources, you have decided to retain new incremental backups for 10 days.

  1. Sign into the My Services application in Oracle Cloud. Follow the instructions in your Welcome email, or go to http://cloud.oracle.com and click Sign In.

  2. From the My Services dashboard click the Menu Icon navigation menu at the top of the page and choose Oracle Java Cloud Service.

    The Oracle Java Cloud Service Console is displayed.

    Oracle Java Cloud Service Console
    Description of this image
  3. Click the name of the service instance for which you want to configure automated backups.

    service instance name
    Description of this image

    The Overview page for the selected service instance is displayed, showing details about the instance.

  4. Click the Administration tile.

    Administration tile
    Description of this image

    The Backup tab on the Administration page is displayed. The current schedule for automated backups is listed at the top of the Backup tab. In the Available Backups table, you might see a list of completed backups that are available for restoration.

    Oracle Java Cloud Service instance Backup page
    Description of this image
  5. Click Manage backups for this service Menu icon screen capture on the Backup page, and then select Configure Backups.

    Configure Backups button
    Description of this image
  6. In the Configure Backups dialog set these options and click Save.
    • Full Backup: Wednesday 11:00 UTC
    • Incremental Backup: 11:00 UTC
    • Coordinated Backups: Yes
    • Oracle Storage Cloud Service Account Details: Do not modify
    • Set new retention period to (in days): 10
    Configure Backups dialog box showing the optons set for this tutorial
    Description of this image
  7. Refresh the page and confirm that it shows the new schedule for automated backups.

    New schedule for automated backups on the Oracle Java Cloud Service instance Backup page
    Description of this image

Initiating an On-Demand Backup of a Service Instance

Before making a major change to your service instance by deploying an application to the instance, you initiate an on-demand backup of the instance, including the database. You decide to keep the backup indefinitely.

  1. Click Manage backups for this service Menu icon screen capture on the Backup page, and then select Backup Now.

    Backup Now button
    Description of this image
  2. In the Backup Now dialog, set these options and click Backup.

    • Include Database: Yes
    • Keep Forever: Yes
    • Notes: Just before deploying my application.
    Back Up Now dialog box showing the options set for this tutorial
    Description of this image
  3. Confirm the backup request is submitted and the backup is in progress.

    You will see a request submitted message at the top of the page, and a new backup row in the Available Backups table. The icon for the new row has an hourglass, indicating the backup is in progress. The text "Backing up..." is displayed at the end of the row. While the backup is in progress, you cannot start any other management operation on the service instance.

    Oracle Java Cloud Service instance Backup page showing a backup in progress
    Description of this image
  4. After a few moments, click the Refresh icon (Refresh) icon to refresh the Backup page. Do this until the backup operation completes.

    Refresh icon
    Description of this image
  5. When the backup is complete, confirm that the backup is added to the list of available backups on the Backup page.

    There will be a green check mark on the backup icon (instead of an hourglass). Next to the Contains label, you will see icons representing Configuration Backup and Database Backup.

    Oracle Java Cloud Service instance Backup page showing new backup
    Description of this image

Making a Change to the Service Instance by Deploying an Application

Now that you have backed up your Oracle Java Cloud Service instance, you are ready to make a change to the service instance. In this tutorial you change the service instance by deploying, starting, and testing an application.

Deploying the Application

  1. From the Menu icon screen capture menu near the top of the page (next to the service instance name), select Open WebLogic Server Console.

    Open WebLogic Server Console menu option
    Description of this image
  2. Log in to the WebLogic Server Administration Console with the user name and password that were supplied when the service instance was created.

    WebLogic Server Administration Console login
    Description of this image

    The WebLogic Server Administration Console is displayed.

    Your browser may display a message about the untrusted (self-signed) certificate that's used by default in your service instance.

    WebLogic Server Administration Console home page
    Description of this image
  3. In the Change Center, click Lock & Edit.

    Change Center, Lock and edit
    Description of this image
  4. In the Domain Structure panel on the left select Deployments.

    Domain Structure, Deployments
    Description of this image
  5. On the Deployments page, click Install.

    Install deployment
    Description of this image
  6. On the Install Application Assistant page, click upload your file(s).

    Click upload files
    Description of this image
  7. For Deployment Archive, click Browse or Choose File. Select the benefits.war application on your local file system to upload and deploy.

    Install Application Assistant, Browse
    Description of this image
  8. After the file is uploaded click Next.

    file uploaded
    Description of this image
  9. Ensure the the uploaded file is selected, then click Next.

    file selected
    Description of this image
  10. Select Install this deployment as an application as the targeting style, then click Next.

    Install as application
    Description of this image
  11. For deployment targets, select the cluster name and All servers in the cluster. Click Next.

    cluster selected
    Description of this image
  12. Do not change the default deployment settings. Note the name of the deployment. Click Next.

    deployment name
    Description of this image
  13. Select No, I will review the configuration later, and click Finish.

    Finish deploying
    Description of this image

    A message is displayed to show that the deployment was successfully installed.

    deployment successful messages
    Description of this image

    The Deployments table shows the application in the distribute Initializing state.

    Deployments table, distribute Initializing
    Description of this image
  14. In the Change Center, click Activate Changes.

    Change Center, Activate Changes
    Description of this image

    The changes are activated and no restart is necessary. The Deployments table shows the application in the Prepared state.

    Deployments table, Prepared
    Description of this image

Starting the Application

After deploying the application, you must start it to make it ready to accept requests.

  1. Click the Control tab at the top of the Deployments page.

    Control tab
    Description of this image
  2. In the Deployments table, select the checkbox to the left of the application.

    Deployments table, select application
    Description of this image
  3. From the Start dropdown list, select Servicing all requests.

    Start menu option, Servicing all requests
    Description of this image
  4. When you are asked to confirm that you want to start the application, click Yes.

    Start Application Assistant
    Description of this image

    The application is now in the Active state and is ready to accept requests.

    Deployments table, application Active
    Description of this image

Testing the Application

After deploying and starting the application, you test the application to ensure that it is working normally.

If your Oracle Java Cloud Service instance contains a load balancer, use its public IP address to access applications. Otherwise, access applications by using the public IP address of the first node in your service instance.

  1. Return to the Oracle Java Cloud Service console. Click the name of the service instance to which the application is deployed.

    service instance name
    Description of this image

    The Overview page for the selected service instance is displayed, showing details about the instance.

  2. Find information about your Load Balancer node and note the Public IP address.

    service instance details
    Description of this image

    When a service instance includes a load balancer, the URL of an application is the public IP address of the load balancer, followed by the application name:

    https://public_ip_of_load_balancer/application_name

    By default, port 443 is used for secure HTTPS connections. If your service instance does not have a load balancer, use the Public IP address of the first WebLogic node instead.

  3. Open a new browser window or tab and enter the URL of the application. In this example, the load balancer public IP address is 192.0.2.200.

    URL address field
    Description of this image

    The home page of your application is displayed.

    Benefits application home page
    Description of this image