#!/bin/sh

if [ -z "$1" ]; then
    echo "Give option for the appendix of the backup files"
else
    # alt: /etc/init.d/samba stop
    systemctl stop samba-ad-dc

    find /var/lib/samba/private -name '*.ldb' -exec echo cp {}-$1 {} \;

    # alt: /etc/init.d/samba start
    systemctl start samba-ad-dc
fi



