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:
@@ -19,3 +19,12 @@ mkdir -p "$BACKUP_PATH"
|
||||
rsync -az --timeout=3600 \
|
||||
--exclude=".stfolder" \
|
||||
"$VM_SSH:$REMOTE_PATH/" "$BACKUP_PATH/"
|
||||
|
||||
NOTIFY_SCRIPT="${NOTIFY_SCRIPT:-/root/scripts/notify-telegram.sh}"
|
||||
if [ -x "$NOTIFY_SCRIPT" ]; then
|
||||
SIZE=$(du -sh "$BACKUP_PATH" 2>/dev/null | cut -f1) || true
|
||||
BODY="Резервное копирование завершено.
|
||||
Объекты: библиотека фото Immich (rsync с VM 200).
|
||||
Размер копии: ${SIZE:-—}."
|
||||
"$NOTIFY_SCRIPT" "📷 Фото Immich (rsync)" "$BODY" || true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user