Exclude backup directories and improve YAML formatting
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled

Add exclusion patterns for Nextcloud and Gitea backup directories to avoid
backing up redundant data. Also normalize YAML indentation to 2 spaces for
consistency.

Changes:
- Exclude /opt/nextcloud/backups from backups
- Exclude /opt/gitea/backups from backups
- Add commented suggestions for preview and updater exclusions
- Normalize YAML indentation from 4 spaces to 2 spaces

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
BeauTroll
2025-12-17 20:40:07 +01:00
parent b2beeb3334
commit 9c03ebf8e2

View File

@@ -5,34 +5,40 @@
# Repository Borg - utilise la variable d'environnement # Repository Borg - utilise la variable d'environnement
repositories: repositories:
- path: "${BORG_REPO}" - path: "${BORG_REPO}"
label: production label: production
# Chemins sources à sauvegarder # Chemins sources à sauvegarder
source_directories: source_directories:
- /var/www - /var/www
- /srv/minecraftserver - /srv/minecraftserver
- /srv/reddiscordbot - /srv/reddiscordbot
- /srv/waltercoiffure - /srv/waltercoiffure
- /etc - /etc
- /opt/nextcloud - /opt/nextcloud
- /opt/traefik - /opt/traefik
- /opt/n8n - /opt/n8n
- /opt/portainer - /opt/portainer
- /opt/uptime-kuma - /opt/uptime-kuma
- /opt/vaultwarden - /opt/vaultwarden
- /opt/mailcow-dockerized - /opt/mailcow-dockerized
- /opt/netdata - /opt/netdata
- /opt/gitea - /opt/gitea
- /home - /home
# Patterns d'exclusion # Patterns d'exclusion
exclude_patterns: exclude_patterns:
- "*.log" - "*.log"
- "*/cache/*" - "*/cache/*"
- "*/tmp/*" - "*/tmp/*"
- "**/__pycache__" - "**/__pycache__"
- "*/node_modules/*" - "*/node_modules/*"
- "/opt/nextcloud/backups"
#- "/opt/nextcloud/data/appdata_*/preview/*" # Miniatures d'images
#- "/opt/nextcloud/updater-*" # Fichiers de mise à jour
- "/opt/gitea/backups"
# Un seul système de fichiers # Un seul système de fichiers
one_file_system: false one_file_system: false
@@ -56,32 +62,31 @@ match_archives: "sh:backup-*"
# Vérifications d'intégrité # Vérifications d'intégrité
checks: checks:
- name: repository - name: repository
frequency: 2 weeks frequency: 2 weeks
- name: archives - name: archives
frequency: 1 month frequency: 1 month
# Nombre d'archives à vérifier # Nombre d'archives à vérifier
check_last: 3 check_last: 3
# Hooks pour notifications (syntaxe Borgmatic 2.0) # Hooks pour notifications (syntaxe Borgmatic 2.0)
commands: commands:
- before: action - before: action
when: [create] when: [create]
run: run:
- echo "Backup démarré" - echo "Backup démarré"
- after: action - after: action
when: [create] when: [create]
run: run:
- echo "Exécution hook de succès" - echo "Exécution hook de succès"
- /etc/borgmatic/hooks/ntfy-success.sh - /etc/borgmatic/hooks/ntfy-success.sh
- after: error
run:
- echo "Exécution hook d'erreur"
- /etc/borgmatic/hooks/ntfy-error.sh
- after: error
run:
- echo "Exécution hook d'erreur"
- /etc/borgmatic/hooks/ntfy-error.sh
# Commandes PostgreSQL/MySQL si nécessaire # Commandes PostgreSQL/MySQL si nécessaire
# postgresql_databases: # postgresql_databases:
# - name: all # - name: all