#!/usr/bin/bash
DEST=${1}
if [[ ! -d "${DEST}" ]]; then
    echo "No such directory"
    exit 1
fi
DATE=$(date +%Y-%m-%d_%H-%M-%S)
find /etc/libvirt -type f -not -path *qemu/* -not -name *.hmac -print0 | xargs -0 tar -czf ${DEST}/libvirt-settings-${DATE}.tar.gz 2> /dev/null


