<?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: Move specific data from one index to another index in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181783#M7714</link>
    <description>&lt;P&gt;Hi @yannK &lt;/P&gt;

&lt;P&gt;what about this query?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=INDEXNAME | eval bkt=_bkt 
|  table index,source,sourcetype,host,bkt
| join bkt 
    [| dbinspect index=INDEXNAME | convert ctime(startEpoch) | convert ctime(endEpoch) 
    |  rename bucketId as bkt]
| table index,source,sourcetype,host,bkt,state,sizeOnDiskMB,startEpoch,endEpoch,splunk_server
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jan 2019 15:31:15 GMT</pubDate>
    <dc:creator>splunkreal</dc:creator>
    <dc:date>2019-01-22T15:31:15Z</dc:date>
    <item>
      <title>Move specific data from one index to another index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181777#M7708</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I want to move specific data from one index to another index. I don't want to make a full copy of previous index i just need to copy some of sourcetypes to another index. Then i need to delete copied data in old index. &lt;/P&gt;

&lt;P&gt;Could someone please provide the best approach to do this? &lt;BR /&gt;
I've read about &lt;EM&gt;collect&lt;/EM&gt; command after search query but i believe it didn't actually copy your data on hard drive.&lt;/P&gt;

&lt;P&gt;And i i've read about splunk cmd exporttool but not so much. Could someone please clarify on this point? Version of splunk is 6.0.1&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 14:51:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181777#M7708</guid>
      <dc:creator>Navern</dc:creator>
      <dc:date>2014-03-11T14:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Move specific data from one index to another index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181778#M7709</link>
      <description>&lt;P&gt;It's difficult to export indexed events. While it is very easy to move/duplicate buckets.&lt;BR /&gt;
If you cannot reindex your data, then my recommendation is to copy the buckets and hide the events.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;identify the buckets with the data you need. &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You can check the time range of each bucket endEpoch and startEpoch and the command :  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|dbinspect index=myindex | convert ctime(startEpoch) | convert ctime(endEpoch) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and use this trick to find in which buckets are your data if you want specific events&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex sourcetype=BBBBBB | eval bkt=_bkt |  stats count by bkt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;UL&gt;
&lt;LI&gt;copy them to the new index (if the index was not empty, avoid bucket id duplicated, see &lt;A href="http://answers.splunk.com/answers/30986/why-is-my-index-disabled"&gt;http://answers.splunk.com/answers/30986/why-is-my-index-disabled&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;enable the delete command in your role (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Delete"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Delete&lt;/A&gt; )&lt;/LI&gt;
&lt;LI&gt;selectively delete the events you do not want on the new index, and the opposite on the original index.&lt;/LI&gt;
&lt;LI&gt;verify&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;The only issue is that your buckets will not shrink when the events are deleted (until the buckets roll out to frozen), so this will initially use more space than before.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 15:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181778#M7709</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-03-11T15:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Move specific data from one index to another index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181779#M7710</link>
      <description>&lt;P&gt;Thanks for the answer,&lt;/P&gt;

&lt;P&gt;I haven't found the way to delete specific data from local disk completely. As far as i know "delete" command just removes this data from search and not from local disk. Command splunk remove index="index" will delete entire index completely. &lt;/P&gt;

&lt;P&gt;Can i remove from local disk data which was deleted via splunk search command?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 15:28:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181779#M7710</guid>
      <dc:creator>Navern</dc:creator>
      <dc:date>2014-03-11T15:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Move specific data from one index to another index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181780#M7711</link>
      <description>&lt;P&gt;No.  You can't modify data once it has been indexed.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 15:37:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181780#M7711</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-03-11T15:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Move specific data from one index to another index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181781#M7712</link>
      <description>&lt;P&gt;The delete just hide results, and does not reclaim disk space.&lt;BR /&gt;
What I was saying is that the space will be retrieved once the whole buckets reach the timerentention limit. (default is 6 years or 500GB, but can be tweaked)&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 16:44:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181781#M7712</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-03-11T16:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Move specific data from one index to another index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181782#M7713</link>
      <description>&lt;P&gt;I've found one of your previous answers to similiar question: &lt;A href="http://answers.splunk.com/answers/25174/how-to-exportimport-events-from-indexes"&gt;http://answers.splunk.com/answers/25174/how-to-exportimport-events-from-indexes&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I see that i will have problem with exporting specific data with this approach. &lt;/P&gt;

&lt;P&gt;It's a pity that there is no script for this even with REST API present.&lt;/P&gt;

&lt;P&gt;Do you know how extensively RAM on server will be used during export? I have a very bad server running Splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 17:57:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181782#M7713</guid>
      <dc:creator>Navern</dc:creator>
      <dc:date>2014-03-11T17:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Move specific data from one index to another index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181783#M7714</link>
      <description>&lt;P&gt;Hi @yannK &lt;/P&gt;

&lt;P&gt;what about this query?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=INDEXNAME | eval bkt=_bkt 
|  table index,source,sourcetype,host,bkt
| join bkt 
    [| dbinspect index=INDEXNAME | convert ctime(startEpoch) | convert ctime(endEpoch) 
    |  rename bucketId as bkt]
| table index,source,sourcetype,host,bkt,state,sizeOnDiskMB,startEpoch,endEpoch,splunk_server
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 15:31:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Move-specific-data-from-one-index-to-another-index/m-p/181783#M7714</guid>
      <dc:creator>splunkreal</dc:creator>
      <dc:date>2019-01-22T15:31:15Z</dc:date>
    </item>
  </channel>
</rss>

