Latest release: 0.1.10 - Changelog | Docker Hub
An image to backup and restore OpenLDAP data and config.
- Quick start
- Environment Variables
- [Set your own environment variables](#set-your-own environment-variables)
- Use command line argument
- Link environment file
- [Make your own image or extend this image](#make-your-own image-or-extend-this-image)
- [Set your own environment variables](#set-your-own environment-variables)
- Advanced User Guide
- Changelog
# Run OpenLDAP image
docker run --name openldap:1.1.0 --detach osixia/openldap:1.1.0
# Run OpenLDAP Backup image
docker run --volumes-from openldap --detach osixia/openldap-backup:0.1.10
Backups are created in the directory /data/backup
that has been declared as a volume, so your backup files are saved outside the container in a data volume.
For more information about docker data volume, please refer to :
The container default log level is info.
Available levels are: none
, error
, warning
, info
, debug
and trace
.
Example command to run the container in debug
mode:
docker run --detach osixia/openldap-backup:0.1.10 --loglevel debug
See all command line options:
docker run osixia/openldap-backup:0.1.10 --help
Environment variables defaults are set in image/environment/default.yaml.
See how to set your own environment variables
-
LDAP_BACKUP_CONFIG_CRON_EXP: Cron expression to schedule OpenLDAP config backup. Defaults to
"0 4 * * *"
. Every days at 4am. -
LDAP_BACKUP_DATA_CRON_EXP: Cron expression to schedule OpenLDAP data backup. Defaults to
"0 4 * * *"
. Every days at 4am. -
LDAP_BACKUP_TTL: Backup TTL in days. Defaults to
15
.
Environment variables can be set by adding the --env argument in the command line, for example:
docker run --env LDAP_BACKUP_CONFIG_CRON_EXP="0 5 * * *" \
--detach osixia/openldap-backup:0.1.10
For example if your environment file is in : /data/ldap/environment/my-env.yaml
docker run --volume /data/ldap/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
--detach osixia/openldap-backup:0.1.10
Take care to link your environment file to /container/environment/XX-somedir
(with XX < 99 so they will be processed before default environment files) and not directly to /container/environment
because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).
This is the best solution if you have a private registry. Please refer to the Advanced User Guide just below.
If you need to add your custom environment files you can extends this image.
Dockerfile example:
FROM osixia/openldap-backup:0.1.10
MAINTAINER Your Name <[email protected]>
ADD environment /container/environment/01-custom
Clone this project:
git clone https://github.com/osixia/docker-openldap-backup
cd docker-openldap-backup
Adapt Makefile, set your image NAME and VERSION, for example:
NAME = osixia/openldap-backup
VERSION = 0.1.10
become:
NAME = cool-guy/openldap-backup
VERSION = 0.1.0
Add environment files...
Build your image:
make build
Run your image:
docker run --detach cool-guy/openldap-backup:0.1.0
We use Bats (Bash Automated Testing System) to test this image:
Install Bats, and in this project directory run:
make test
Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.
More information:
osixia-openldap-backup kubernetes examples are available in osixia/docker-openldap.
This image is based on osixia/openldap. More info: https://github.com/osixia/docker-openldap
Please refer to: CHANGELOG.md