<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Changing SPLUNK_DB location in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/644390#M223193</link>
    <description>&lt;P&gt;You may take a look at below to see the detailed info on changing Splunk DB location and copying the data from existing directory to new.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pandeysumitsolutions.blogspot.com/2023/05/changing-splunk-db-location-if-our.html" target="_blank"&gt;https://pandeysumitsolutions.blogspot.com/2023/05/changing-splunk-db-location-if-our.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Blog link - &lt;A href="http://sumitpandey.co.in" target="_blank"&gt;http://sumitpandey.co.in&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2023 04:29:07 GMT</pubDate>
    <dc:creator>Sumit</dc:creator>
    <dc:date>2023-05-24T04:29:07Z</dc:date>
    <item>
      <title>What is the quickest and safest way to move indexed data from one location to another?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107449#M183371</link>
      <description>&lt;P&gt;What's the quickest and safest way to move indexed data from one location to another? I have data that is currently stored in the default $SPLUNK_HOME/var/lib/splunk location and I need to move it to a different directory going forward.&lt;/P&gt;
&lt;P&gt;If I don't move the existing data, will Splunk be able to search the data that's in the old location in addition to those that will be written in the new directory?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 08:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107449#M183371</guid>
      <dc:creator>acontarciego</dc:creator>
      <dc:date>2023-05-24T08:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SPLUNK_DB location</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107450#M183372</link>
      <description>&lt;P&gt;There's a topic in our doc wiki that provides procedures for moving indexes:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Indexer/Moveanindex"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Indexer/Moveanindex&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2012 19:41:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107450#M183372</guid>
      <dc:creator>Steve_G_</dc:creator>
      <dc:date>2012-10-30T19:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SPLUNK_DB location</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107451#M183373</link>
      <description>&lt;P&gt;it's pretty simple. Stop Splunk, move the data, change the &lt;CODE&gt;indexes.conf&lt;/CODE&gt; file to point to the new location. If you're moving not just one index, but the entire &lt;CODE&gt;$SPLUNK_DB&lt;/CODE&gt; directory, you can instead edit the &lt;CODE&gt;splunk-launch.conf&lt;/CODE&gt; file and modify the &lt;CODE&gt;SPLUNK_DB&lt;/CODE&gt; setting. Then start Splunk up again.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2012 22:30:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107451#M183373</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-10-30T22:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SPLUNK_DB location</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107452#M183374</link>
      <description>&lt;P&gt;I think $SPLUNK_DB on Linux by default is: /opt/splunk/var/lib/splunk. The referenced link does not make that clear.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2014 19:43:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107452#M183374</guid>
      <dc:creator>bmcnally</dc:creator>
      <dc:date>2014-12-30T19:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SPLUNK_DB location</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107453#M183375</link>
      <description>&lt;H4&gt;Here's the error I'm getting&lt;/H4&gt;

&lt;P&gt;&lt;CODE&gt;Search not executed: The minimum free disk space (5000MB) reached for /opt/splunk/var/run/splunk/dispatch. user=admin.&lt;/CODE&gt;&lt;/P&gt;

&lt;H4&gt;Here are the changes I made to move the splunk DB from original location to new place to increase space.&lt;/H4&gt;

&lt;P&gt;`[root@splunk]# cat etc/splunk-launch.conf&lt;/P&gt;

&lt;H1&gt;Version 6.0&lt;/H1&gt;

&lt;H1&gt;Modify the following line to suit the location of your Splunk install.&lt;/H1&gt;

&lt;H1&gt;If unset, Splunk will use the parent of the directory this configuration&lt;/H1&gt;

&lt;H1&gt;file was found in&lt;/H1&gt;

&lt;P&gt;SPLUNK_HOME=/opt/splunk&lt;/P&gt;

&lt;H1&gt;By default, Splunk stores its indexes under SPLUNK_HOME in the&lt;/H1&gt;

&lt;H1&gt;var/lib/splunk subdirectory.  This can be overridden&lt;/H1&gt;

&lt;H1&gt;here:&lt;/H1&gt;

&lt;H1&gt;SPLUNK_DB=/opt/splunk/var/lib/splunk&lt;/H1&gt;

&lt;P&gt;SPLUNK_DB=/home/splunk&lt;/P&gt;

&lt;H1&gt;Splunkd daemon name&lt;/H1&gt;

&lt;P&gt;SPLUNK_SERVER_NAME=splunkd&lt;/P&gt;

&lt;H1&gt;Splunkweb daemon name&lt;/H1&gt;

&lt;P&gt;SPLUNK_WEB_NAME=splunkweb&lt;BR /&gt;
`&lt;/P&gt;

&lt;H4&gt;BEFORE: My root partition was almost full but the home partition has a lot of free space&lt;/H4&gt;

&lt;P&gt;&lt;CODE&gt;[root@splunk]# df -h&lt;BR /&gt;
Filesystem            Size  Used Avail Use% Mounted on&lt;BR /&gt;
/dev/mapper/vg_centos6-lv_root&lt;BR /&gt;
                       17G   15G  949M  94% /&lt;BR /&gt;
tmpfs                 939M     0  939M   0% /dev/shm&lt;BR /&gt;
/dev/sda1             477M   96M  356M  22% /boot&lt;BR /&gt;
/dev/sdb1             158G   42G  108G  29% /home&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;H4&gt;So i used this command to copy the files from old location on root partition to new location on home partition&lt;/H4&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
[root@splunk]# splunk stop&lt;BR /&gt;
[root@splunk]# cp -R var/lib/splunk/ /home/splunk/&lt;BR /&gt;
[root@splunk]# rm -fR /opt/splunk/var/lib/splunk/&lt;BR /&gt;
[root@splunk]# splunk start&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;H4&gt;AFTER: Verify splunk is working properly and error message about space is gone.&lt;/H4&gt;

&lt;P&gt;&lt;CODE&gt;[root@splunk]# df -h&lt;BR /&gt;
Filesystem            Size  Used Avail Use% Mounted on&lt;BR /&gt;
/dev/mapper/vg_centos6-lv_root&lt;BR /&gt;
                       17G  9.5G  6.0G  62% /&lt;BR /&gt;
tmpfs                 939M     0  939M   0% /dev/shm&lt;BR /&gt;
/dev/sda1             477M   96M  356M  22% /boot&lt;BR /&gt;
/dev/sdb1             158G   42G  108G  29% /home&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107453#M183375</guid>
      <dc:creator>iben</dc:creator>
      <dc:date>2020-09-29T08:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SPLUNK_DB location</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107454#M183376</link>
      <description>&lt;P&gt;If I'm moving my default SPLUNK_DB location to a new location, can I make a change in the splunk-launch.conf like this:&lt;/P&gt;

&lt;P&gt;SPLUNK_HOME=/opt/splunk&lt;BR /&gt;
SPLUNK_DB=/apps/mysplunkdb&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:35:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107454#M183376</guid>
      <dc:creator>splunk_kk</dc:creator>
      <dc:date>2020-09-29T15:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SPLUNK_DB location</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107455#M183377</link>
      <description>&lt;P&gt;This is what I followed to get this migrated.&lt;/P&gt;

&lt;P&gt;Stop the splunk : service splunk stop&lt;BR /&gt;
Run the below command : rsync -av /opt/splunk/var/lib/ /splunk_data_vol/ &lt;BR /&gt;
Take a backup of /opt/splunk/etc/splunk-launch.conf&lt;BR /&gt;
Override the new $SPLUNK_DB path /splunk_data_vol/splunk under /opt/splunk/etc/splunk-launch.conf&lt;BR /&gt;
Start the splunk : service splunk start&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:15:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/107455#M183377</guid>
      <dc:creator>chandu245</dc:creator>
      <dc:date>2020-09-30T00:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SPLUNK_DB location</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/644390#M223193</link>
      <description>&lt;P&gt;You may take a look at below to see the detailed info on changing Splunk DB location and copying the data from existing directory to new.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pandeysumitsolutions.blogspot.com/2023/05/changing-splunk-db-location-if-our.html" target="_blank"&gt;https://pandeysumitsolutions.blogspot.com/2023/05/changing-splunk-db-location-if-our.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Blog link - &lt;A href="http://sumitpandey.co.in" target="_blank"&gt;http://sumitpandey.co.in&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 04:29:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-quickest-and-safest-way-to-move-indexed-data-from/m-p/644390#M223193</guid>
      <dc:creator>Sumit</dc:creator>
      <dc:date>2023-05-24T04:29:07Z</dc:date>
    </item>
  </channel>
</rss>

