{"id":9,"date":"2006-06-01T16:19:14","date_gmt":"2006-06-01T23:19:14","guid":{"rendered":"http:\/\/www.dreness.com\/blog\/archives\/9"},"modified":"2006-08-06T12:11:35","modified_gmt":"2006-08-06T19:11:35","slug":"automated-backups-of-open-directory-databases","status":"publish","type":"post","link":"https:\/\/dreness.com\/blog\/archives\/9","title":{"rendered":"Automated backups of Open Directory databases"},"content":{"rendered":"<pre># Automated backups of Open Directory databases (ldap \/ kerberos \/ password server)\r\n# This needs to run as root and should be mode 700 due to embedded password\r\n\r\n# Get current date\r\nTODAY=`\/bin\/date +'%m-%d-%y_%H:%M:%S'`\r\n\r\n# Set destination directory  (do not include trailing slash!)\r\nDSTDIR=\/path\/to\/backups\r\n\r\n# Set archive password (needed to restore from \/ unlock the resulting dmg)\r\nPASS=&quot;the_foo&quot;\r\n\r\n# Feed a heredoc to serveradmin\r\n\/usr\/sbin\/serveradmin command &lt;&lt;EOF\r\ndirserv:backupArchiveParams:archivePassword = $PASS\r\ndirserv:backupArchiveParams:archivePath = $DSTDIR\/od_backup_$TODAY\r\ndirserv:command = backupArchive\r\nEOF<\/pre>\n","protected":false},"excerpt":{"rendered":"<p># Automated backups of Open Directory databases (ldap \/ kerberos \/ password server) # This needs to run as root and should be mode 700 due to embedded password # Get current date TODAY=`\/bin\/date +&#8217;%m-%d-%y_%H:%M:%S&#8217;` # Set destination directory (do &hellip; <a href=\"https:\/\/dreness.com\/blog\/archives\/9\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-os-x-server","category-scripts"],"_links":{"self":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":0,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/media?parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/categories?post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/tags?post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}