Deployment Architecture

Is there a way to catch error from the Splunk cmd window when trying to backup kvstore from batch file in windows?

paulito123
Explorer

Hello Experts.

I'm trying to backup our kvstores with the well documented backup command in a windows batch file. I tried using CALL as well as START. CALL doesn't do anything. START will initiate another splunk cmd window but it closes after some seconds without any result. Is there a way to catch error from the Splunk cmd window?

Here is what I tried, with a lot of combinations.

 

set AppName=my_app
set ArchiveName=What_ever
cd %CorrectFolder% > verified by running echo %cd%
CALL splunk.exe backup kvstore -archiveName %ArchiveName% -appName %AppName%
START "title" "splunk.exe" backup kvstore -archiveName %ArchiveName% -appName %AppName%

 

Thanks in advance

Paul

Labels (2)
Tags (2)
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...