<?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: Copy an index on the same Splunk instance in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14447#M92</link>
    <description>&lt;P&gt;you can always use -n as a dry-run to see what rsync will do before running it for real&lt;/P&gt;</description>
    <pubDate>Thu, 24 May 2018 04:52:10 GMT</pubDate>
    <dc:creator>matthewpearce</dc:creator>
    <dc:date>2018-05-24T04:52:10Z</dc:date>
    <item>
      <title>Copy an index on the same Splunk instance</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14441#M86</link>
      <description>&lt;P&gt;Are there any good solutions for copying the contents of an index to a different index name on the same Splunk instance (e.g. cp index1 index2) so that quiries can be made against either and get the same result?
Use Case:
Site-specific test of performance across different storage mediums (RAID5 vs RAID1+0).  The goal is to measure the performance of the same queries across the same data with the same results and to understand what that will cost them.&lt;/P&gt;

&lt;P&gt;Note: Re-ingest of the original data to the test indexes is possible but will cost time/resources and create license violations.  A more efficient way would be ideal.&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2010 04:54:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14441#M86</guid>
      <dc:creator>sdwilkerson</dc:creator>
      <dc:date>2010-05-28T04:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Copy an index on the same Splunk instance</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14442#M87</link>
      <description>&lt;P&gt;You can simply copy entire buckets between indexes for the purpose of a test like this.&lt;/P&gt;

&lt;P&gt;You could probably get away with using something like &lt;CODE&gt;rsync&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rsync -a --delete $SPLUNK_HOME/var/lib/splunk/index1 $SPLUNK_HOME/var/lib/splunk/index2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Be sure that &lt;CODE&gt;index2&lt;/CODE&gt; doesn't already exist first.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;You need the &lt;CODE&gt;--delete&lt;/CODE&gt; if you are going to keep things in sync (by running this periodically) since Splunk frequently creates and removes files during the indexing process.&lt;/P&gt;

&lt;P&gt;All of your warm buckets should really only be copied once, but the "hot" buckets have lots of changes going on.  If you don't need your data to be very up to date, then you could simply copy your only the warm buckets (the ones named like &lt;CODE&gt;db_*_*_*&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;I think as long as you're only feeding events into &lt;CODE&gt;index1&lt;/CODE&gt; and NEVER into &lt;CODE&gt;index2&lt;/CODE&gt;, you should be ok.  I probably wouldn't recommend this as a long-term approach, but for some testing this should be an adequate solution.&lt;/P&gt;

&lt;P&gt;I think this is obvious, but if running &lt;CODE&gt;rsync&lt;/CODE&gt; during a lower-volume time would be more ideal.&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2010 05:07:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14442#M87</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-28T05:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Copy an index on the same Splunk instance</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14443#M88</link>
      <description>&lt;P&gt;Yeah. You can just stop Splunk and copy the entire index folders (hot/warm and cold, or just hot/warm if that's all you have) to the new folder paths, then configure the new path in Splunk &lt;CODE&gt;indexes.conf&lt;/CODE&gt; as a new index, then restart Splunk.&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2010 05:08:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14443#M88</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-05-28T05:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Copy an index on the same Splunk instance</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14444#M89</link>
      <description>&lt;P&gt;Um, right.  Hopefully this has something to do with the fact that I have been on travel for a month straight and has nothing to do with my splunktelligence.&lt;BR /&gt;
Actually a botched rsync (bad trailing slash) put the source as a dir in the dest instead in the dest proper and somehow I missed my mistake.  Ugh.  Thanks Lowell!!&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2010 07:26:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14444#M89</guid>
      <dc:creator>sdwilkerson</dc:creator>
      <dc:date>2010-05-28T07:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Copy an index on the same Splunk instance</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14445#M90</link>
      <description>&lt;P&gt;Thanks Gerald!!&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2010 07:28:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14445#M90</guid>
      <dc:creator>sdwilkerson</dc:creator>
      <dc:date>2010-05-28T07:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Copy an index on the same Splunk instance</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14446#M91</link>
      <description>&lt;P&gt;You know, I thought about actually mentioning that but decided not to.  (I did double check to make sure my example was right, which I think it is).  Of course the nice thing is you can often just move the path manually and then re-run rsync.  BTW, I always put my rsync commands inside a script for that exact reason.  It's just way too easy to screw up; especially when your tacking &lt;CODE&gt;--delete&lt;/CODE&gt; on there.&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2010 21:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14446#M91</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-28T21:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Copy an index on the same Splunk instance</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14447#M92</link>
      <description>&lt;P&gt;you can always use -n as a dry-run to see what rsync will do before running it for real&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 04:52:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Copy-an-index-on-the-same-Splunk-instance/m-p/14447#M92</guid>
      <dc:creator>matthewpearce</dc:creator>
      <dc:date>2018-05-24T04:52:10Z</dc:date>
    </item>
  </channel>
</rss>

