{"id":61375,"date":"2023-11-26T11:00:53","date_gmt":"2023-11-26T10:00:53","guid":{"rendered":"https:\/\/ekiwi-blog.de\/61375\/compare-and-synchronise-keepass-files\/"},"modified":"2024-05-25T09:10:12","modified_gmt":"2024-05-25T08:10:12","slug":"compare-and-synchronise-keepass-files","status":"publish","type":"post","link":"https:\/\/ekiwi-blog.de\/en\/61375\/compare-and-synchronise-keepass-files\/","title":{"rendered":"Compare and synchronise KeePass files"},"content":{"rendered":"<p>Two KeePass files and which is the current one?<\/p>\n<p><!--more--><\/p>\n<p>A few days ago I realised that I had two KeePass files lying around. I had tidied up once and stored the file somewhere else, but unfortunately didn&#8217;t delete the one file. So it&#8217;s quite possible that I was working with the new file on one computer and still using the old one on another.<\/p>\n<p>It&#8217;s a pity if the entries diverge and I end up without any user data. But what options are there for comparing the files? KeePass itself does not offer any functions for this, or I have overlooked it.<\/p>\n<p>But let&#8217;s take a look.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of content<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ekiwi-blog.de\/en\/61375\/compare-and-synchronise-keepass-files\/#File_size_and_date\" >File size and date<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ekiwi-blog.de\/en\/61375\/compare-and-synchronise-keepass-files\/#Number_of_entries\" >Number of entries<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ekiwi-blog.de\/en\/61375\/compare-and-synchronise-keepass-files\/#Comparison_XML_export\" >Comparison XML export<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ekiwi-blog.de\/en\/61375\/compare-and-synchronise-keepass-files\/#Synchronise_databases\" >Synchronise databases<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"File_size_and_date\"><\/span>File size and date<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The first option is to simply look at the file date and size. One file was last modified a good 2 months ago. OK, a good indication that this file is significantly older. Interestingly, the file size of the new file was smaller. Probably because I had optimised the database once.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_1.png\" alt=\"\" width=\"600\" height=\"169\" class=\"aligncenter size-full wp-image-61354\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_1.png 600w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_1-300x85.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Number_of_entries\"><\/span>Number of entries<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Next, I opened both files and checked <a href=\"https:\/\/ekiwi-blog.de\/en\/64216\/how-many-pizzas-per-person\/\" title=\"How many pizzas per person?\"  data-wpil-monitor-id=\"5\">how many<\/a> entries there were. There were two more entries in the new file. New entries tend to be added rather than deleted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_2.png\" alt=\"\" width=\"798\" height=\"467\" class=\"aligncenter size-full wp-image-61358\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_2.png 798w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_2-300x176.png 300w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_2-768x449.png 768w\" sizes=\"auto, (max-width: 798px) 100vw, 798px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Comparison_XML_export\"><\/span>Comparison XML export<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Another option is to perform an XML export and compare both files. This can be done via the file menu.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_3.png\" alt=\"\" width=\"406\" height=\"556\" class=\"aligncenter size-full wp-image-61362\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_3.png 406w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_3-219x300.png 219w\" sizes=\"auto, (max-width: 406px) 100vw, 406px\" \/><\/p>\n<p>We can then compare the file with a comparison software such as <a href=\"https:\/\/winmerge.org\/?lang=de\" target=\"_blank\" rel=\"noopener\">WinMerge<\/a>.<\/p>\n<p>The new file also contains corresponding information and more recent data. This makes it very clear in principle which file is new.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_4.png\" alt=\"\" width=\"1274\" height=\"386\" class=\"aligncenter size-full wp-image-61366\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_4.png 1274w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_4-300x91.png 300w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_4-1024x310.png 1024w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_4-768x233.png 768w\" sizes=\"auto, (max-width: 1274px) 100vw, 1274px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Synchronise_databases\"><\/span>Synchronise databases<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>But what do I do if I have worked on both files and the statuses have diverged? No problem here either, there is a synchronisation function.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_5.png\" alt=\"\" width=\"483\" height=\"131\" class=\"aligncenter size-full wp-image-61370\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_5.png 483w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/11\/keepass_5-300x81.png 300w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/p>\n<p>Synchronisation takes place without feedback, after which both data files are at the same level. Unfortunately, it is not possible to see which data has been updated where.<\/p>\n<p>But it worked for me without any problems.<\/p>","protected":false},"excerpt":{"rendered":"<p>Two KeePass files and which is the current one?<\/p>\n","protected":false},"author":1,"featured_media":18731,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1555],"tags":[],"class_list":["post-61375","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-en"],"_links":{"self":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts\/61375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/comments?post=61375"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts\/61375\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/media\/18731"}],"wp:attachment":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/media?parent=61375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/categories?post=61375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/tags?post=61375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}