mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 09:41:36 +01:00
23 lines
688 B
Bash
23 lines
688 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
DIR=/home/sheppy/slapd_backup
|
|
|
|
rsync -r --remove-source-files sheppy@192.168.122.112:$DIR /home/sheppy
|
|
|
|
~/backups/backup-tools/backup_manager.py --extensions ldif -- $DIR
|
|
|
|
rsync --delete --rsh="/usr/bin/sshpass -p HISTORY_PURGED_SECRET ssh -p23" -r slapd_backup/* u244665-sub2@u244665.your-storagebox.de:./slapd_backup/
|
|
|
|
for file in "$DIR"/*; do
|
|
# Check if the file is empty
|
|
if [ ! -s "$file" ]; then
|
|
echo "Empty file found: $file"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
curl -H "Content-Type: application/json" \
|
|
-X POST https://async-icinga.atlantishq.de/report \
|
|
-d '{ "service" : "slapd_backup", "token" : "HISTORY_PURGED_SECRET", "status" : "OK", "info" : "" }'
|