{"id":358,"date":"2018-12-28T21:27:25","date_gmt":"2018-12-28T20:27:25","guid":{"rendered":"https:\/\/blog.van-daag.nl\/?p=358"},"modified":"2020-03-27T16:41:29","modified_gmt":"2020-03-27T15:41:29","slug":"fix-domoticz-db","status":"publish","type":"post","link":"https:\/\/van-daag.nl\/?p=358","title":{"rendered":"Fix Domoticz DB"},"content":{"rendered":"\n<p><strong>The FIX::<\/strong><\/p>\n\n\n\n<p>You need to have sqlite3 installed on your Pi<\/p>\n\n\n\n<p>CODE:&nbsp;<a href=\"https:\/\/www.domoticz.com\/forum\/viewtopic.php?t=10984#\">SELECT ALL<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install sqlite3 <\/code><\/pre>\n\n\n\n<p>If you have it you can do the following commands:<br><\/p>\n\n\n\n<p>CODE:&nbsp;<a href=\"https:\/\/www.domoticz.com\/forum\/viewtopic.php?t=10984#\">SELECT ALL<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\ncd domoticz\nsqlite3 domoticz.db\n.mode insert\n.output dump.sql\n.dump\n.exit<\/code><\/pre>\n\n\n\n<p> <\/p>\n\n\n\n<p>Remove first line of dumped database: <br>tail dump.sql -n +2 &gt; dump1.sql <br># Make back-up of original just in case: <br>mv domoticz.db domoticz.bak.db <br># Import into fresh database: <br>sqlite3 domoticz.db &lt; dump1.sql <br># Clean-up the temporary files: <br>rm dump*.sql <\/p>\n\n\n\n<p><a href=\"https:\/\/www.domoticz.com\/forum\/viewtopic.php?t=10984\">https:\/\/www.domoticz.com\/forum\/viewtopic.php?t=10984<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The FIX:: You need to have sqlite3 installed on your Pi CODE:&nbsp;SELECT ALL If you have it you can do the following commands: CODE:&nbsp;SELECT ALL Remove first line of dumped database: tail dump.sql -n +2 &gt; dump1.sql # Make back-up of original just in case: mv domoticz.db domoticz.bak.db # Import into fresh database: sqlite3 domoticz.db [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[35,13],"tags":[],"class_list":["post-358","post","type-post","status-publish","format-standard","hentry","category-domoticz","category-raspberry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/van-daag.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=358"}],"version-history":[{"count":2,"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/posts\/358\/revisions"}],"predecessor-version":[{"id":360,"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/posts\/358\/revisions\/360"}],"wp:attachment":[{"href":"https:\/\/van-daag.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/van-daag.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/van-daag.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}