Getting Data In

Cold to frozen script, simply moving to thawed folder- how to genericize?

tedder
Communicator

I want to use the coldToFrozenScript to simply move from cold to my thawed path. Great, my shell script simply contains the following: mv -r "$1" /mnt/thawed/

However, if I use this for multiple indexes, I need to move it to the path for the index: /mnt/thawed/indexname/

How can I genericize this? I mean, I can set an argument, but can I detect the index or the thawedPath easily?

1 Solution

dwaddle
SplunkTrust
SplunkTrust

If you know the index name, say via an argument, then you can ask btool to tell you the thawed path, similar to:

$ splunk cmd btool indexes list main | grep thawedPath
thawedPath = $SPLUNK_DB/defaultdb/thaweddb

BEWARE, btool may not be officially supported right now, or ever.

View solution in original post

jarjoh42
Path Finder

Ha-zaw
A Powershell Script for windows users to thaw multiple buckets.


Set-ExecutionPolicy -ExecutionPolicy Bypass


$Date =  get-date -Format yyyyMMdd


Foreach ($SplunkDBs in Get-ChildItem "D:\Splunk_Indexes\indexA\thaweddb")

    {
         & "c:\Program Files\splunk\bin\splunk.exe" rebuild D:\Splunk_Indexes\indexA\thaweddb\$SplunkDBs


    }

0 Karma

lpolo
Motivator

You can use the search command "dbinspect". For example:
|dbinspect index=main

Cheers,
Lp

0 Karma

dwaddle
SplunkTrust
SplunkTrust

If you know the index name, say via an argument, then you can ask btool to tell you the thawed path, similar to:

$ splunk cmd btool indexes list main | grep thawedPath
thawedPath = $SPLUNK_DB/defaultdb/thaweddb

BEWARE, btool may not be officially supported right now, or ever.

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...