Today I found this nice tool to create configuration scripts for Jboss EAP from existing configurations.
$ Â git clone https://github.com/tfonteyn/profilecloner.git
$ Â cd profilecloner
$ Â export JBOSS_HOME=/opt/jboss/
$ Â mvn install
$ Â ln -s profilecloner.jar target/profile*jar
$  ./profilecloner.sh -f save-script-here.cli  –controller=$HOST –username=admin –password=secret /profile=full-ha antani-new-profile-name
$ Â cat save-script-here.cli
Enjoy!