Add notification feature to backup scripts for various services

Enhance backup scripts for Nextcloud, Gitea, Paperless, Vaultwarden, Immich, and VPS configurations by adding Telegram notifications upon completion. Include details such as backup size and objects backed up. Update backup documentation to reflect these changes and ensure clarity on backup processes and retention policies.
This commit is contained in:
2026-02-27 20:42:30 +03:00
parent 56cee83198
commit f319133cee
21 changed files with 1048 additions and 168 deletions

View File

@@ -71,3 +71,12 @@ if [ -f "$S3_ENV" ]; then
else
echo "Подсказка: для бэкапа S3 создайте $S3_ENV с S3_ACCESS_KEY, S3_SECRET_KEY, S3_BUCKET_NAME."
fi
NOTIFY_SCRIPT="${NOTIFY_SCRIPT:-/root/scripts/notify-telegram.sh}"
if [ -x "$NOTIFY_SCRIPT" ]; then
SIZE=$(du -sh "$BACKUP_ROOT" 2>/dev/null | cut -f1) || true
BODY="Резервное копирование завершено.
Объекты: БД, voice_users, S3 (telegram-helper-bot).
Размер копии: ${SIZE:-}."
"$NOTIFY_SCRIPT" "🖥️ VPS Миран" "$BODY" || true
fi