<?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 Is it possible to restore a KV store by overwriting the mongo folder contents backend? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-restore-a-KV-store-by-overwriting-the-mongo/m-p/533508#M4845</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I accidentally cleaned a KV store and I don't have the source data to recreate it.&amp;nbsp; I do have backups of the /var/lib/splunk/kvstore/mongo directory.&lt;/P&gt;&lt;P&gt;Is it possible to overwrite the contents of the now empty KV store by copying the contents of my backup into the mongo folder backend?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
    <pubDate>Thu, 17 Dec 2020 21:00:53 GMT</pubDate>
    <dc:creator>andrewtrobec</dc:creator>
    <dc:date>2020-12-17T21:00:53Z</dc:date>
    <item>
      <title>Is it possible to restore a KV store by overwriting the mongo folder contents backend?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-restore-a-KV-store-by-overwriting-the-mongo/m-p/533508#M4845</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I accidentally cleaned a KV store and I don't have the source data to recreate it.&amp;nbsp; I do have backups of the /var/lib/splunk/kvstore/mongo directory.&lt;/P&gt;&lt;P&gt;Is it possible to overwrite the contents of the now empty KV store by copying the contents of my backup into the mongo folder backend?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 21:00:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-restore-a-KV-store-by-overwriting-the-mongo/m-p/533508#M4845</guid>
      <dc:creator>andrewtrobec</dc:creator>
      <dc:date>2020-12-17T21:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to restore a KV store by overwriting the mongo folder contents backend?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-restore-a-KV-store-by-overwriting-the-mongo/m-p/533557#M4846</link>
      <description>&lt;P&gt;&amp;nbsp;I found as solution that works for me and involves loading the backup into a local mongo and exporting what i need to a csv file.&amp;nbsp; Here are&amp;nbsp; the steps:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was done with mongo from Splunk 7.3.5, recover on win10 workstation&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Obtain copy of KV store (default location /opt/splunk/var/lib/splunk/kvstore/mongo/) and place in local directory (ex. C:\mongo_backup)&lt;/LI&gt;&lt;LI&gt;Download MongoDB community edition 3.6.x (&lt;A href="https://www.mongodb.com/download-center/community/releases" target="_blank"&gt;https://www.mongodb.com/download-center/community/releases&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;Install as admin with default settings. Install MongoDBCompass as well (you will be prompted during install)&lt;/LI&gt;&lt;LI&gt;Run CMD as admin and browse to MongoDB bin directory (C:\Program Files\MongoDB\Server\3.6\bin)&lt;/LI&gt;&lt;LI&gt;Launch mongod process on mongo backup: mongod --dbpath C:\mongo_backup (CMD window will remain open)&lt;/LI&gt;&lt;LI&gt;Launch MongoDBCompass&lt;/LI&gt;&lt;LI&gt;Connect to mongod process by clicking CONNECT (you don't need to specify connection string, it automatically assumes localhost on default port)&lt;/LI&gt;&lt;LI&gt;From the database list that appears, select the one to export&lt;/LI&gt;&lt;LI&gt;Select the collection inside the db to view database&lt;/LI&gt;&lt;LI&gt;On the right hand side of the green "ADD DATA" button click the "Export Collection" icon&lt;/LI&gt;&lt;LI&gt;Select "Export Full Collection" and click "SELECT FIELDS"&lt;/LI&gt;&lt;LI&gt;Select the fields to export and click "SELECT OUTPUT"&lt;/LI&gt;&lt;LI&gt;Select export format, specify filename, and click "EXPORT"&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I will now take the export (csv in my case) load it into Splunk and write to the KV store.&lt;/P&gt;&lt;P&gt;Hope this provides some useful info for others with my problem.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 11:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-restore-a-KV-store-by-overwriting-the-mongo/m-p/533557#M4846</guid>
      <dc:creator>andrewtrobec</dc:creator>
      <dc:date>2020-12-18T11:26:08Z</dc:date>
    </item>
  </channel>
</rss>

