Installation

Moving Splunk indexer from one host to another host

nikhilkotagiri
Explorer

Hello ,

We have installed splunk on one box (Linux) but because of disk space issues we want to move the Splunk another Box.This is splunk indexer and we don't want to loose the history.

So ideally we want to move splunk indexer from host "A" to Host "B".

If we use tarball of the existing splunk directory in other host , whether it will work?

Thanks in advance...

Nikhil

Tags (2)

ajparagas
Engager

Would rsyncing the data form within the same server from say /opt/splunk to /splunk_storage/

0 Karma

hulahoop
Splunk Employee
Splunk Employee

Yes, this will work as long as you move only the datastore to the same location on the new server. The default location is $SPLUNK_HOME/var/lib/splunk for the entire datastore including event data and Splunk internal data, and $SPLUNK_HOME/var/lib/splunk/defaultdb for just the event data. Make sure you stop Splunk before moving the datastore. For the rest of Splunk, just install a new Splunk instance on the new box.

Take a look at this Splunk Wiki topic for more details:

Migrating a Splunk Installation

gkanapathy
Splunk Employee
Splunk Employee

you can almost move the whole tarball, but it's not much harder and much much safer to just move (a) a tar of the indexed data, plus (b) a tar of the custom config which can be generated with, e.g., cd $SPLUNK_HOME/etc && find . -type d -name local | xargs tar -cf custcfg.tar and untaring that back over a new install.

Simeon
Splunk Employee
Splunk Employee

You cannot move all of the Splunk directory within a tar ball to another host. This is not supported.

As an alternative, you can create a tar ball of all your indexed information ($SPLUNK_HOME/var/lib/splunk) and move that to the index location of your new installation of Splunk. When doing this, you must first move and unpack your tar ball into the new location prior to the very first startup of the new installation of Splunk. Alternatively, you can have the tar ball overwrite the directory location if you happen to have started it up by accident.

0 Karma
Get Updates on the Splunk Community!

Index This | Divide 100 by half. What do you get?

November 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...

Splunk and Fraud

Watch Now!Watch an insightful webinar where we delve into the innovative approaches to solving fraud using the ...