From 06561bd8b7bd252ab0507adcede4f44a8e29f190 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 18 Apr 2019 21:00:21 +0200 Subject: [PATCH] Add example backup script --- contrib/create-backup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 contrib/create-backup.sh diff --git a/contrib/create-backup.sh b/contrib/create-backup.sh new file mode 100644 index 0000000..36eda4d --- /dev/null +++ b/contrib/create-backup.sh @@ -0,0 +1,9 @@ +#!/bin/bash +CONF_LOCATION=/data/slapd.d +CONTAINER_NAME=ldap + +# dump configuration +docker exec -it ldap slapcat -F $CONF_LOCATION -n 0 > conf.ldif + +# dump data +docker exec -it ldap slapcat -F $CONF_LOCATION -n 1 > data.ldif