{"id":271,"date":"2011-05-25T15:04:58","date_gmt":"2011-05-25T13:04:58","guid":{"rendered":""},"modified":"2016-02-22T13:02:04","modified_gmt":"2016-02-22T12:02:04","slug":"berkeley-db-upgrade","status":"publish","type":"post","link":"https:\/\/drfugazi.eu.org\/en\/berkeley-db-upgrade\/","title":{"rendered":"BerkeleyDB upgrade"},"content":{"rendered":"<p>During switching LDAP directory to new environment with newer version of OpenLDAP (2.4.25) and new BerkeleyDB (5.1.25), I received following error message:<\/p>\n<pre><code>\r\nProgram version 5.1 doesn't match environment version 4.7\r\ndatabase ... cannot be opened, err -30969. Restore from backup!\r\nbdb(...): txn_checkpoint interface requires an environment configured for the transaction subsystem\r\nbdb_db_close: database \"...\": txn_checkpoint failed: Invalid argument (22).\r\nbackend_startup_one (type=hdb, suffix=\"...\"): bi_db_open failed! (-30969)\r\nbdb_db_close: database \"...\": alock_close failed\r\n<\/code><\/pre>\n<p>This means that you need to upgrade BerkeleyDB. Because this is not OpenLDAP specific, but rather BerkeleyDB specific, I decided to describe how to fix this issue. First of all let&#8217;s make a backup:<br \/>\n<!--more--><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# cd \/data\/var\/openldap\/openldap-data\r\n# cp -a database database.db47\r\n<\/pre>\n<p>let&#8217;s try make <code>db_upgrade<\/code>:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# \/usr\/local\/BerkeleyDB.5.1\/bin\/db_upgrade -h \/data\/var\/openldap\/openldap-data\/database *\r\ndb_upgrade: Program version 5.1 doesn't match environment version 4.7\r\ndb_upgrade: DB_ENV-&gt;open: DB_VERSION_MISMATCH: Database environment version mismatch\r\n<\/pre>\n<p>Nope, we need to get back to <b>old environment<\/b> and make some steps there:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# \/usr\/local\/BerkeleyDB.4.7\/bin\/db_checkpoint -1 -h \/data\/var\/openldap\/openldap-data\/database\r\n# \/usr\/local\/BerkeleyDB.4.7\/bin\/db_recover -h \/data\/var\/openldap\/openldap-data\/database\r\n<\/pre>\n<p>after this we can switch to new installation and just run application, which should be able to recover BerkeleyDB in new version. You can also do this manually in new environment: <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\/usr\/local\/BerkeleyDB.5.1\/bin\/db_upgrade -e<\/pre>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>During switching LDAP directory to new environment with newer version of OpenLDAP (2.4.25) and new BerkeleyDB (5.1.25), I received following error message:<\/p>\n<pre><code>\r\nProgram version 5.1 doesn't match environment version 4.7\r\ndatabase ... cannot be opened, err -30969. Restore from backup!\r\nbdb(...): txn_checkpoint interface requires an environment configured for the transaction subsystem\r\nbdb_db_close: database \"...\": txn_checkpoint failed: Invalid argument (22).\r\nbackend_startup_one (type=hdb, suffix=\"...\"): bi_db_open failed! (-30969)\r\nbdb_db_close: database \"...\": alock_close failed\r\n<\/code><\/pre>\n<p>This means that you need to upgrade BerkeleyDB. Because this is not OpenLDAP specific, but rather BerkeleyDB specific, I decided to describe how to fix this issue. First of all let&#8217;s make a backup:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[108],"tags":[76],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7M9Tz-4n","jetpack-related-posts":[{"id":266,"url":"https:\/\/drfugazi.eu.org\/en\/","url_meta":{"origin":271,"position":0},"title":"OpenLDAP-2.4.25","author":"drfugazi","date":"Friday May 20th, 2011","format":false,"excerpt":"OpenLDAP jest implementacj\u0105 open source protoko\u0142u Lightweight Directory Access Protocol. soft@wega:~\/openldap% .\/drf_openldap-2.4.25_conf cc: Sun C 5.10 SunOS_sparc 2009\/06\/03 usage: cc [ options] files. Use 'cc -flags' for details MANPATH=\/usr\/local\/share\/man:\/usr\/local\/man:\/usr\/share\/man PATH=\/usr\/local\/bin:\/usr\/bin:\/opt\/SUNWspro\/bin:\/usr\/ccs\/bin CFLAGS=-fast -xautopar CPPFLAGS=-I\/usr\/local\/ssl\/include -I\/usr\/local\/BerkeleyDB.5.1\/include -I\/usr\/local\/include CXXFLAGS=-fast -xautopar LDFLAGS=-L\/usr\/local\/ssl\/lib -R\/usr\/local\/ssl\/lib -L\/usr\/local\/BerkeleyDB.5.1\/lib -R\/usr\/local\/BerkeleyDB.5.1\/lib -L\/usr\/local\/lib -R\/usr\/local\/lib ============================================= dmake clean [y|n] ? n","rel":"","context":"In \"Compilation\"","block_context":{"text":"Compilation","link":"https:\/\/drfugazi.eu.org\/en\/tag\/kompilacja\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":211,"url":"https:\/\/drfugazi.eu.org\/en\/openldap-2423\/","url_meta":{"origin":271,"position":1},"title":"openldap-2.4.23","author":"drfugazi","date":"Monday August 16th, 2010","format":false,"excerpt":"OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol. The suite includes: slapd - stand-alone LDAP daemon (server) ibraries implementing the LDAP protocol, and utilities, tools, and sample clients. Source: http:\/\/www.openldap.org\/","rel":"","context":"In \"Mail system\"","block_context":{"text":"Mail system","link":"https:\/\/drfugazi.eu.org\/en\/tag\/mail_system\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":210,"url":"https:\/\/drfugazi.eu.org\/en\/","url_meta":{"origin":271,"position":2},"title":"openldap-2.4.23","author":"drfugazi","date":"Monday August 16th, 2010","format":false,"excerpt":"OpenLDAP jest Open Sourceow\u0105 implementacj\u0105 us\u0142ugi katalogowej opartej na protokole LDAP (Lightweight Directory Access Protocol) Suita zawiera: slapd - samodzielnie dzia\u0142aj\u0105cy demon LDAP (serwer); biblioteki implementuj\u0105ce protok\u00f3\u0142 LDAP; narz\u0119dzia, programy u\u017cytkowe i przyk\u0142adowe klienty. \u0179r\u00f3d\u0142o: http:\/\/www.openldap.org\/","rel":"","context":"In \"Compilation\"","block_context":{"text":"Compilation","link":"https:\/\/drfugazi.eu.org\/en\/tag\/kompilacja\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":263,"url":"https:\/\/drfugazi.eu.org\/en\/","url_meta":{"origin":271,"position":3},"title":"BerkeleyDB-5.1.25","author":"drfugazi","date":"Friday May 20th, 2011","format":false,"excerpt":"Oracle Berkeley DB jest wiod\u0105cym, osadzalnym silnikiem przestrzeni, kt\u00f3ra zapewnia developerom szybk\u0105, niezawodn\u0105, lokaln\u0105 baz\u0119 danych bez potrzeby administracji. Oracle Berkeley DB jest bibliotek\u0105, kt\u00f3r\u0105 mo\u017cna w\u0142\u0105czy\u0107 bezpo\u015brednio do aplikacji. Aplikacja tworzy proste wywo\u0142ania funkcji zamiast wysy\u0142a\u0107 zapytania do zdalnego serwera, eliminuj\u0105c narzuty wydajno\u015bciowe architektur klient-serwer.","rel":"","context":"In \"BerkeleyDB\"","block_context":{"text":"BerkeleyDB","link":"https:\/\/drfugazi.eu.org\/en\/tag\/berkeleydb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":223,"url":"https:\/\/drfugazi.eu.org\/en\/apache-2217\/","url_meta":{"origin":271,"position":4},"title":"apache-2.2.17","author":"drfugazi","date":"Wednesday November  3rd, 2010","format":false,"excerpt":"Projekt Apache HTTP Server, to przedsi\u0119wzi\u0119cie maj\u0105ce na celu rozw\u00f3j i utrzymywanie serwera HTTP o otwartym kodzie, dla nowoczesnych system\u00f3w operacyjnych, takich jak UNIX czy Windows NT. Celem tego projektu jest dostarczenie bezpiecznego, wydajnego i skalowalnego serwera, kt\u00f3ry dostarcza us\u0142ug zgodnych z aktualnymi standardami HTTP. Apache httpd jest najbardziej popularnym\u2026","rel":"","context":"In \"Apache\"","block_context":{"text":"Apache","link":"https:\/\/drfugazi.eu.org\/en\/tag\/apache\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":225,"url":"https:\/\/drfugazi.eu.org\/en\/apache-2217\/","url_meta":{"origin":271,"position":5},"title":"apache-2.2.17","author":"drfugazi","date":"Tuesday November 16th, 2010","format":false,"excerpt":"The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/271"}],"collection":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/comments?post=271"}],"version-history":[{"count":1,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/271\/revisions"}],"predecessor-version":[{"id":596,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/271\/revisions\/596"}],"wp:attachment":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/media?parent=271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/categories?post=271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/tags?post=271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}