icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading Stateful Snapshot for Splunk
SHA256 checksum (stateful-snapshot-for-splunk_101.tgz) b8e47e34b79d61b192d5c0b958bf9535b9056bb20541635d150cd44f883f878d
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate


Stateful Snapshot for Splunk

Splunk Labs
This app is NOT supported by Splunk. Please read about what that means for you here.
Stateful Snapshot for Splunk empowers Splunk administrators to capture Splunk's point-in-time state (such as configuration files and KVStore). These "snapshots" are automatically generated and retained for a period of time or up to a total disk usage (all of which is configurable).
This builds upon the practices espoused in http://docs.splunk.com/Documentation/Splunk/latest/Admin/Backupconfigurations

* Important *
See the Details tab for more specific instructions.

* Questions *
Select the "Ask a question" button (on the right) to post a question (tagged with this app).

Known Issues

  1. Secret items that might be required during restore are NOT backedup in this solution (lookups, secrets, keys, etc..)
  2. KVStore is not properly backed up in current implementation



  • Unix only. This is NOT Windows compatible.
  • Use of the git solution requires git to already be installed an initialized. See Git's Official Site for instructions, downloads, and support.
  • Needs $SPLUNK_HOME and $HOME to be defined as part of the unix profile

Planning Your Deployment

  1. This solution does NOT backup indexed data.
  2. Log records of the scripted inputs used by this solution are accessable with macros (diag_stateful_snapshot and git_stateful_snapshot) or directly by sourcetype stateful_snapshot:* through the Splunk Search UI.
  3. Identify which Splunk installations you'd like to collect snapshots from. This is where you will deploy the app to. Tip: Deploy to your source copy locations like a Deployment Server and at least one Search Head. Similarly, you may choose to deploy to your Deployer, Master Node, License Master, and Monitoring Console instances. The Stateful Snapshot for Splunk contains macro and sourcetype configuration that will ease usage when troubleshooting using a Splunk Search UI. Therefore, you may choose to deploy the app to Search Head(s) even with inputs disabled.
  4. Choose if you will use the Diag and/or GIT solution. Enabling the respective scripted input before deployment may be desireable.
  5. If desired, create a new index for the stateful_snapshot logs to be retained in. Be sure to update the respective stateful_snapshot inputs to this new index as well as the stateful_snapshot_index macro.
  6. Consider the desired frequency for snapshots. More frequent may require more disk space. Less frequent may introduce more risk of lost knowledge objects in a rapidly evolving Splunk deployment. See the interval attribute within the Scripted Input stanza of inputs.conf. The default is 86400 seconds, which is one a day.


  1. Install the Stateful Snapshot for Splunk. Refer to the standard methods for Splunk Add-on installs as documented for a Single Server Install or a Distributed Environment Install.
  2. Enable either the Diag or GIT based inputs.


There are some variables near the start of the scripts that you may choose to change. These are directly in the scripts and therefore not configurable through configuration files.


  • time = datetime stamp used in the snapshot file names.
  • collect_folders = components of the diag to be collected thereby reducing the system's resource usage
  • maxsize = maximum storage volume consumed collectively by all snapshots. Measured in kb.
  • maxage = maximum age of snapshots. Measured in days.
  • backupDir = path where snapshots are kept


  • git_path = location of splunk configuration


Select the "Ask a question" button (on the right) to post a question (tagged with this app).


Release Notes

Version 1.0.1
Aug. 15, 2018

Minor fixes!


Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk Inc. in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.