LDAP-GIT-BACKUP(1)
β¨ LDAP-GIT-BACKUP β¨
okay bestie, pull up a chair π this is the manual page for ldap-git-backup, a User Commands classic, and honestly? it's giving "your LDAP directory but make it version controlled" π
πΈ NAME πΈ
ldap-git-backup β check in LDIF from an LDAP server into a GIT repository
like. it takes your LDIF and commits it. that's the whole vibe. π
π¦ SYNOPSIS π¦
ldap-git-backup [options]
ldap-git-backup --help
π DESCRIPTION π
okay so here's the tea β ldap-git-backup takes an LDIF dump of an LDAP server and updates a GIT repository that serves as a versioned backup. it's a backup but make it aesthetic β every state of your directory lives in git history. iconic behavior, no cap.
and the way it works?? ldap-git-backup splits the LDIF data into separate entries. then it constructs unique but stable file names using a combination of the creation time stamp for ordering and the DN as the unique key for an entry. so like, deterministic names, sorted by time, keyed by DN. chef's kiss π
β¨ OPTIONS β¨
--ldif-cmd <dump_ldif_command>β specify a command that creates a complete LDIF dump of the LDAP directory, suitable for a backup. it should contain all entries necessary to restore the LDAP database. by default/usr/sbin/safe-ldifis taken, which calls/usr/sbin/slapcatfrom OpenLDAP. π«Ά
if you have access to an LDAP server over the network you can use ldapsearch as your --ldif-cmd. example:
--ldif-cmd 'ldapsearch -u -x -o ldif-wrap=no \
-H ldaps://ldap.example.org -b dc=example,dc=org'
and if you need to log in to a certain server first, you'd use something along the lines of:
--ldif-cmd 'ssh host.example.org ldapsearch -u -x -o ldif-wrap=no \
-H ldaps://ldap.example.org -b dc=example,dc=org'
you can make this as complicated as you like as long as it fits into a one line command. if you need more, you may want to create a script for the purpose. (get your main character energy on, bestie π§)
--backup-dir <backup_directory>β specify the directory where the GIT repository for the versioned backup is held. default:/var/backups/ldapπ--commit-msg <commit_string>β specify a custom commit message. default:ldap-git-backup
example:
--commit-msg "Import $(date --rfc-3339=seconds)"
--commit-date <date_string>/--commit-date <file>β specify a custom commit date. if a file is given, its modification time is used. β--no-gcβ do not perform a garbage collection (git gc) after checking in the new backup. by default gc is done so as to keep the size of the backup down. you may want to skip gc for the occasional backup run but leave it on for the scheduled backups. lowkey a good tip, highkey true π--helpβ prints this page. π
ngl bestie, that's literally every option. we ate. π₯
π AUTHOR π
Elmar S. Heeb <elmar@heebs.ch>
and that's the whole page, fr fr π this was ldap-git-backup version 1.0.8, dated 2021-01-06 β go forth and version your directory, you absolute legend πβ¨π
π¦ where this page comes from
- debian bookworm: ldap-git-backup 1.0.8-1.1 Β· GPL-3.0-or-later
- debian trixie: ldap-git-backup 1.0.8-1.1 Β· GPL-3.0-or-later
- ubuntu jammy: ldap-git-backup 1.0.8-1.1 Β· GPL-3.0-or-later
- ubuntu noble: ldap-git-backup 1.0.8-1.1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms