Hysen Labs
Open-source project
osixia/docker-openldap-backup avatar
osixia

docker-openldap-backup

A docker image to run OpenLDAP, and make periodic backups 🐳

100 stars42 forksShellMIT
01
DEEP OPEN-SOURCE ANALYSIS

docker-openldap-backup: OpenLDAP with a backup habit

A Docker image that runs OpenLDAP and schedules periodic backups of its configuration and data. Backups land in a mapped volume so the LDAP files survive outside the container.

02
DEEP OPEN-SOURCE ANALYSIS

Run, and it backs itself up

The image runs OpenLDAP and, on top of that, makes periodic backups. Backups are written to /data/backup, which should be mapped as a volume so the LDAP files end up outside the container. The run example in the README passes a cron expression and a backup volume in one docker run command, detached.

03
DEEP OPEN-SOURCE ANALYSIS

Two schedules, one default

Backup timing lives in environment variables. LDAP_BACKUP_CONFIG_CRON_EXP holds the cron expression for the configuration backup, and LDAP_BACKUP_DATA_CRON_EXP does the same for the data backup. Both default to 0 4, meaning every day at 4am. Either one can be overridden by passing a new value when the container starts.

04
DEEP OPEN-SOURCE ANALYSIS

Setting environment variables

Environment can be supplied two ways. The command line takes the --env flag for a quick override, and a YAML environment file offers a more structured route. The README warns that custom files should be linked into the numbered subdirectories of the environment folder so they are processed before the defaults, because the base directory holds predefined files that fix things like LANG and locale settings.

05
DEEP OPEN-SOURCE ANALYSIS

Around the container

The image builds on osixia/openldap, with a link to that upstream project for more detail. Log levels run from none, error, warning, info, debug, and trace, with info as the default. Security findings go to a project email address, minor issues can be filed on GitHub, and a note on Kubernetes describes it as a system for managing containerized applications. Contributions come in as pull requests, plus helping users and starring the repo.

06
DEEP OPEN-SOURCE ANALYSIS

Editorial conclusion

Two cron variables drive the schedule, both defaulting to every day at 4am. Point a volume at the backup directory, override the timings if you like, and the container handles the rest.

07
DEEP OPEN-SOURCE ANALYSIS

Official sources

08
Community notes

Community notes