{"id":474,"date":"2015-05-26T06:51:54","date_gmt":"2015-05-26T06:51:54","guid":{"rendered":"http:\/\/www.napolifrancesco.it\/?p=474"},"modified":"2015-05-26T06:51:54","modified_gmt":"2015-05-26T06:51:54","slug":"openldap-backup-restore","status":"publish","type":"post","link":"https:\/\/napolifrancesco.it\/?p=474","title":{"rendered":"Openldap: Backup &#038; Restore"},"content":{"rendered":"<p>Per effettuare il <strong>backup<\/strong> di ldap \u00e8 necessario:<\/p>\n<p># slapcat -v -l backup_openldap.ldif<\/p>\n<p>Per <strong>ripristinare<\/strong> un backup invece:<\/p>\n<p>Stoppiamo il servizio,<\/p>\n<p># \/etc\/init.d\/ldap stop<\/p>\n<p>Rinominiamo la cartella esistente di ldap:<\/p>\n<p># mv \/var\/lib\/ldap \/var\/lib\/ldap.old<\/p>\n<p>Ne creiamo una nuova con i relativi permessi:<\/p>\n<p># mkdir \/var\/lib\/ldap<br \/>\n# chown -R ldap:ldap ldap<br \/>\n# chmod go-rwx ldap<\/p>\n<p>Copiamo la configurazione dalla cartella vecchia:<\/p>\n<p># cp \u2013rfp \/var\/lib\/ldap.old\/DB_CONFIG \/var\/lib\/ldap<\/p>\n<p>E importiamo il backup<\/p>\n<p># slapadd \u2013v \u2013l \/backup\/openldap\/backup_ldap2.diff<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Per effettuare il backup di ldap \u00e8 necessario: # slapcat -v -l backup_openldap.ldif Per ripristinare un backup invece: Stoppiamo il servizio, # \/etc\/init.d\/ldap stop Rinominiamo la cartella esistente di ldap: # mv \/var\/lib\/ldap \/var\/lib\/ldap.old Ne creiamo una nuova con i relativi permessi: # mkdir \/var\/lib\/ldap # chown -R ldap:ldap ldap # chmod go-rwx ldap Copiamo&#8230; <\/p>\n<div class=\"link-more\"><a href=\"https:\/\/napolifrancesco.it\/?p=474\">Read More<\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-474","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=\/wp\/v2\/posts\/474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=474"}],"version-history":[{"count":0,"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=\/wp\/v2\/posts\/474\/revisions"}],"wp:attachment":[{"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/napolifrancesco.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}