Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Taking Configuration Snapshots in JBoss EAP

When making changes to a JBoss EAP server configuration, it's often worthwhile to ensure copies of these configurations exist, both to revert to a snapshot should a change fail or simply to save a successful configuration for use on other servers. To do this, we can work with JBoss EAP's native snapshot feature to take, manage, and remove configuration snapshots.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 15m
Published
Clock icon Jan 24, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Deploy a Standalone Server Based on the Provided Snapshot

    1. Stop the current JBoss EAP server:

      sudo systemctl stop jboss-eap-rhel
      
    2. Move into the JBoss EAP home directory:

       cd /opt/jboss-eap
      
    3. Start a standalone server using the 20191121-201850161standalone.xml snapshot:

       sudo ./bin/standalone.sh --server-config=standalone_xml_history/snapshot/20191121-201850161standalone.xml
      
    4. Check that you can access the management console at PUBLICIP:9990.

    5. Shut down the server with CTRL+C.

  2. Challenge

    Take a Snapshot of the Current Deployment

    Before replacing the configuration file, we want to take a snapshot of the current configuration located at /opt/jboss-eap/standalone/configuration/standalone.xml just in case something fails.

    Note: This is the configuration used by our service and the one used in the /opt/jboss/bin/standalone.sh script, unless we override it as we did in the previous task.

    1. Restart the JBoss service:

      sudo systemctl start jboss-eap-rhel
      
    2. Open the JBoss CLI:

      sudo ./bin/jboss-cli.sh
      
    3. Connect to the server:

      connect
      
    4. Take a snapshot of the current configuration:

      :take-snapshot
      
    5. Exit the CLI:

      exit
      
  3. Challenge

    Replace the Standalone Configuration

    1. We know the 20191121-201850161standalone.xml configuration is the one we wish to use. Since we know our jboss-eap-rhel service relies on /opt/jboss-eap/standalone/configuration/standalone.xml, we can just copy our snapshot there:

      sudo cp standalone/configuration/standalone_xml_history/snapshot/20191121-201850161standalone.xml standalone/configuration/standalone.xml
      
    2. Restart the service:

      sudo systemctl restart jboss-eap-rhel
      
    3. Confirm you can access the management console.

  4. Challenge

    Delete the Old Snapshot

    1. Access the JBoss CLI:

      sudo ./bin/jboss-cli.sh
      
    2. Connect to the server:

      connect
      
    3. List the available snapshots:

      :list-snapshots
      
    4. Remove the backup snapshot of the failing configuration:

      :delete-snapshot(name=20191122-133032735standalone.xml)
      
    5. Exit the CLI:

      exit
      

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans