Cleaning up our directories

When you upload an app, you should move everything out of local and into default. This is important because all changes that a user makes will be stored in local.

When your app is upgraded, all files in the app (except local files) will be replaced, and the user's changes will be lost. The following Unix commands illustrate what needs to be done:

  1. First, let's copy our app to another location, perhaps /tmp:
cp -r $SPLUNK_HOME/etc/apps/is_app_one /tmp/  
  1. Next, let's move everything from local to default. In the case of .xml files, we can simply move the files; but .conf files are a little more complicated, and we need to merge them manually. The following command does this:
cd /tmp/is_app_one
mv local/data/ui/nav/*.xml ...

Get Implementing Splunk 7 - Third Edition 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.