#!/bin/bash
# this script is called by VNS3 before create snapshot, copy instances and reboot

BACKUP_DIR="/opt/backup"
mkdir -p "$BACKUP_DIR"

# Export configuration and data to LDIF files
slapcat -n 0 -l /opt/backup/config.ldif    
slapcat -n 1 -l /opt/backup/data.ldif
