Scrpit to stop dgraph, archive logs, start dgraph

  1. Home
  2. Blog
  3. Scrpit to stop dgraph, archive logs, start dgraph

Scrpit to stop dgraph, archive logs, start dgraph

DgraphCluster has an object’s applyIndex() method from the default “DistributeIndexAndApply” scrpit to create a new script within your Deployment Template. You can see this script in AppConfig.xml for your application. The applyIndex() method will stop the dgraph, archived the log files, then restarted the dgraph.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<script id="RestartDgraphAndArchiveLogs">
<bean-shell-script>
[![CDATA[DgraphCluster.applyIndex();]]>
</bean-shell-script>
</script>
<script id="RestartDgraphAndArchiveLogs"> <bean-shell-script> [![CDATA[DgraphCluster.applyIndex();]]> </bean-shell-script> </script>
<script id="RestartDgraphAndArchiveLogs">
      <bean-shell-script>
              [![CDATA[DgraphCluster.applyIndex();]]>
       </bean-shell-script>
</script>


For running this script, we can execute below command from location where your application is installed. For example if application installed at “C:\Endeca\Apps\DemoApp\” then go to location “C:\Endeca\Apps\DemoApp\control\” then run below command

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
"runcommand.bat/sh RestartDgraphAndArchiveLogs"
"runcommand.bat/sh RestartDgraphAndArchiveLogs"
"runcommand.bat/sh RestartDgraphAndArchiveLogs"
1 2 3 20
Let's Share
Hide Buttons
follow me on twitter
follow me on facebook
follow me on Linkedin
0%