# HG changeset patch # User Heiko Schlittermann # Date 1598968750 -7200 # Node ID 02a361d9594277f9370bea37d7eb0f7111f86455 # Parent ce55890c4ed397485521a3be1ec3e2c9400856d2 Move to ssh://git@git.schlittermann.de/ius/ldap-backup diff -r ce55890c4ed3 -r 02a361d95942 Makefile --- a/Makefile Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -prefix = /usr/local -sbin = ${DESTDIR}${prefix}/sbin - -all: - -install: all - install -m 755 ldap-backup ${sbin}/ diff -r ce55890c4ed3 -r 02a361d95942 README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Tue Sep 01 15:59:10 2020 +0200 @@ -0,0 +1,1 @@ +Moved to ssh://git@git.schlittermann.de/ius/ldap-backup diff -r ce55890c4ed3 -r 02a361d95942 debian/README.source --- a/debian/README.source Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -ldap-backup for Debian ----------------------- - - - - - - diff -r ce55890c4ed3 -r 02a361d95942 debian/changelog --- a/debian/changelog Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -ldap-backup (0.6+nmu1) oldstable stable; urgency=medium - - * Non-maintainer upload. - * remove files older than ~6 months - * becalm lintian a bit - - -- Matthias Förste Fri, 04 Dec 2015 16:46:22 +0100 - -ldap-backup (0.6) oldstable stable; urgency=medium - - * fixed relative destination directory: - - -- Heiko Schlittermann (HS12-RIPE) Wed, 08 Apr 2015 14:15:29 +0200 - -ldap-backup (0.5) oldstable stable; urgency=medium - - * cope with file based configuration: - - -- Heiko Schlittermann (HS12-RIPE) Fri, 30 Jan 2015 00:55:34 +0100 - -ldap-backup (0.4) oldstable stable; urgency=medium - - * Non-maintainer upload. - * copy to oldstable - - -- Heiko Schlittermann (HS12-RIPE) Fri, 30 Jan 2015 00:43:37 +0100 - -ldap-backup (0.3) stable; urgency=low - - * fixed PATH for cron.daily - - -- Heiko Schlittermann Thu, 02 Jan 2014 17:39:03 +0100 - -ldap-backup (0.2) stable; urgency=low - - * added cron.daily - - -- Heiko Schlittermann Thu, 02 Jan 2014 17:32:42 +0100 - -ldap-backup (0.1) stable; urgency=low - - * Initial Release. - - -- Heiko Schlittermann Thu, 02 Jan 2014 17:07:04 +0100 diff -r ce55890c4ed3 -r 02a361d95942 debian/compat --- a/debian/compat Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -8 diff -r ce55890c4ed3 -r 02a361d95942 debian/control --- a/debian/control Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -Source: ldap-backup -Section: admin -Priority: extra -Maintainer: Heiko Schlittermann (HS12-RIPE) -Build-Depends: debhelper (>= 8.0.0) -Standards-Version: 3.9.6 -Homepage: https://ssl.schlittermann.de/hg/ldap-backup - -Package: ldap-backup -Architecture: all -Depends: bash (>= 0), ${misc:Depends} -Description: backup the current ldap databases - This tiny script dumps the current ldap databases via slapcat. The - dump includes the cn=config information. diff -r ce55890c4ed3 -r 02a361d95942 debian/copyright --- a/debian/copyright Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: ldap-backup -Source: - -Files: * -Copyright: - -License: GPL-3.0+ - -Files: debian/* -Copyright: 2014 Heiko Schlittermann -License: GPL-3.0+ - -License: GPL-3.0+ - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see . - . - On Debian systems, the complete text of the GNU General - Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid to pick license terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. diff -r ce55890c4ed3 -r 02a361d95942 debian/docs diff -r ce55890c4ed3 -r 02a361d95942 debian/ldap-backup.cron.daily --- a/debian/ldap-backup.cron.daily Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#! /bin/sh -set -e -DIR=~backup/ldap -if ! test -d $DIR -then - mkdir $DIR - chown openldap: $DIR -fi - -su openldap -s /bin/sh -c "PATH=$PATH ldap-backup $DIR" diff -r ce55890c4ed3 -r 02a361d95942 debian/ldap-backup.dirs --- a/debian/ldap-backup.dirs Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/usr/sbin diff -r ce55890c4ed3 -r 02a361d95942 debian/rules --- a/debian/rules Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ - -override_dh_auto_install: - $(MAKE) DESTDIR=./debian/ldap-backup prefix=/usr install diff -r ce55890c4ed3 -r 02a361d95942 debian/source/format --- a/debian/source/format Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -3.0 (native) diff -r ce55890c4ed3 -r 02a361d95942 ldap-backup --- a/ldap-backup Thu Dec 17 16:37:41 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -#! /bin/bash -# to be used in /etc/cron.daily/ -# source: hg clone https://ssl.schlittermann.de/hg/ldap-backup -# (c) 2013 Heiko Schlittermann - -set -e -export LC_ALL=C - -ME=$(basename $0) -cf=/etc/$ME.conf -basename='ldap' -days='180' - -if test -t 0; then - # terminal/interactive - destination=$(readlink -f ${1:?Need destination directory}) -else - # cron - destination=${1:-/var/backups/ldap} - exec &>/tmp/$(basename $0).log -fi - -test -d "$destination" || { - echo "$0: \`$destination' is not a directory" >&2 - exit -} - -tag=$(date -I) -tmpdir=$(mktemp -d --suffix=.$(basename $0)) -test "/tmp" = $(dirname $tmpdir) \ - && trap "rm -rf $tmpdir" EXIT - -cd $tmpdir -dir="$basename.$tag" -mkdir "$dir" - -# save the config db -{ - if test -d /etc/ldap/slapd.d - then - slapcat -n 0 >"$dir"/cn=config.ldif - grep olcSuffix: "$dir"/cn=config.ldif - else - ldapsearch -s base -b '' -x -LLL namingContexts | grep ^namingContexts - fi -} | cut -f2 -d' ' | while read suffix; do - slapcat -b "$suffix" > "$dir/$suffix.ldif" - tar czf "$destination"/"$dir".tar.gz.$$ "$dir" - mv "$destination"/"$dir".tar.gz.$$ \ - "$destination"/"$dir".tar.gz - -done - -find "$destination" -name "$basename"'.*'.tar.gz -mtime "+$days" -print0 | xargs -r0 rm