Added backup playbook
This commit is contained in:
7 files changed
+173
No files matched your search
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
BACKUP_DIR="/opt/backup/pending"
|
||||
UNIFIEDPUSH_TOPIC="https://push.epickiwi.fr/hP4ByeeTDeLmCCPN-sauvegardes-mel"
|
||||
|
||||
PENDING_BACKUP_COUNT=$( find "$BACKUP_DIR" -type f | grep -e '\.tar\(.gz\)*$' | wc -l )
|
||||
|
||||
if [[ "$PENDING_BACKUP_COUNT" -gt 0 ]]; then
|
||||
curl -d "$(hostname --long): $PENDING_BACKUP_COUNT pending backups" "$UNIFIEDPUSH_TOPIC"
|
||||
echo "Advertized $PENDING_BACKUP_COUNT panding backup"
|
||||
else
|
||||
echo "There is no pending backup"
|
||||
fi
|
||||
Reference in new issue
Block a user