ansible/playbooks/apps/files/bin/borgmatic_on_after_backup.sh

12 lines
395 B
Bash
Raw Normal View History

2024-10-13 19:14:54 +02:00
#!/bin/bash
SOURCE_DIRECTORY="/mnt/data/nextcloud-aio/backups/borg"
rm "$SOURCE_DIRECTORY/aio-lockfile"
if docker ps --format "{{.Names}}" | grep "^nextcloud-aio-nextcloud$"; then
docker exec -en nextcloud-aio-nextcloud bash /notify.sh "Remote Borg backup successful!" "Synchronised the backup repository successfully!"
else
echo "Synchronised the backup repository successfully."
fi