<commit_before>#!/bin/bash
# dump the ldap database

OUTFILE=ldapdb-`/bin/date +%d-%m-%y_%H-%M`.ldif

#echo "Starting slapcat..."
/usr/sbin/slapcat -n0 > $OUTFILE && /usr/sbin/slapcat -n1 >> $OUTFILE
gzip -9 $OUTFILE
find `dirname $OUTFILE` -name "*.ldif" -mtime +30 -exec rm -f {} \;
find `dirname $OUTFILE` -name "*.ldif.gz" -mtime +30 -exec rm -f {} \;
STATE=$?
exit $STATE<commit_msg>Separate config and data <commit_after>#!/bin/bash
# dump the ldap database

OUTFILE_CONFIG=/var/www/vhosts/feg-giessen.de/backups/ldapdb-`/bin/date +%d-%m-%y_%H-%M`_config.ldif
OUTFILE_DATA=/var/www/vhosts/feg-giessen.de/backups/ldapdb-`/bin/date +%d-%m-%y_%H-%M`_data.ldif

#echo "Starting slapcat..."
/usr/sbin/slapcat -n0 > $OUTFILE_CONFIG && /usr/sbin/slapcat -n1 >> $OUTFILE_DATA
gzip -9 $OUTFILE_CONFIG
gzip -9 $OUTFILE_DATA
find `dirname $OUTFILE_CONFIG` -name "*.ldif" -mtime +30 -exec rm -f {} \;
find `dirname $OUTFILE_CONFIG` -name "*.ldif.gz" -mtime +30 -exec rm -f {} \;
STATE=$?
exit $STATE
{'fraction_non_alphanumeric': 0.20342396777442096, 'fraction_numerical': 0.015105740181268883, 'mean_word_length': 3.872549019607843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2057579', 'n_tokens_mistral': 444, 'n_tokens_neox': 426, 'n_words': 92}