Backing up your configuration file via the CLI
In this recipe, we will learn how to backup our configuration via the CLI. Essentially, the CLI backs up the standalone.xml
file by copying it into the snapshot
.
Getting ready
Start up your WildFly so that we can directly connect to it via the CLI, as follows:
$ cd ~/WFC/wildfly $ ./bin/standalone.sh
How to do it…
The command itself is pretty easy:
$ ./bin/jboss-cli.sh --connect [standalone@localhost:9990 /] :take-snapshot { "outcome" => "success", "result" => "/home/luigi/WFC/wildfly/standalone/configuration/standalone_xml_history/snapshot/20150301-165737562standalone.xml" }
That's it! A backup of the standalone.xml
file gets copied into the snapshot
folder, named by prefixing the file with the current ...
Get WildFly Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.