From fc8c4135999f4af9070aadf8141d166ec748b63d Mon Sep 17 00:00:00 2001 From: BeauTroll <-> Date: Tue, 16 Dec 2025 05:17:57 +0100 Subject: [PATCH] fix deprecated config validation --- Makefile | 2 +- QUICKSTART.md | 4 ++-- README.md | 5 +---- install.sh | 6 +++--- scripts/healthcheck.sh | 5 ++--- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 2adc09f..813a3b6 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ install: ## Installe Borgmatic et configure le système test-config: ## Valide la configuration Borgmatic @echo "$(BLUE)Validation de la configuration...$(NC)" - borgmatic config validate + @validate-borgmatic-config || borgmatic --dry-run -v 0 test-notifications: ## Teste les notifications ntfy @echo "$(BLUE)Test des notifications ntfy...$(NC)" diff --git a/QUICKSTART.md b/QUICKSTART.md index 82c5e19..431b203 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -136,8 +136,8 @@ sudo ./scripts/healthcheck.sh # Voir les logs journalctl -u borgmatic.service -n 50 -# Tester la configuration -borgmatic config validate +# Tester la configuration (avec dry-run) +borgmatic --dry-run # Mode verbeux sudo borgmatic --verbosity 2 diff --git a/README.md b/README.md index 92e3add..fb145ea 100644 --- a/README.md +++ b/README.md @@ -141,10 +141,7 @@ borg key export /path/to/repo backup-key.txt ### Tester la configuration ```bash -# Valider la configuration -borgmatic config validate - -# Dry-run (simulation) +# Valider la configuration (avec dry-run) borgmatic --dry-run --verbosity 2 # Lister les fichiers qui seront sauvegardés diff --git a/install.sh b/install.sh index 40c3b51..172a9e4 100755 --- a/install.sh +++ b/install.sh @@ -114,11 +114,11 @@ else fi # Test de la configuration (sans exécuter de backup) -if borgmatic config validate > /dev/null 2>&1; then +if validate-borgmatic-config > /dev/null 2>&1; then echo -e "${GREEN}✅ Configuration valide${NC}" else - echo -e "${YELLOW}⚠️ La configuration nécessite des ajustements${NC}" - echo -e "${YELLOW} Vérifiez /etc/borgmatic/config.yaml${NC}" + echo -e "${YELLOW}⚠️ Validation de la configuration...${NC}" + echo -e "${YELLOW} Testez avec: borgmatic --dry-run${NC}" fi # 7. Affichage des prochaines étapes diff --git a/scripts/healthcheck.sh b/scripts/healthcheck.sh index 3cc8a33..65093d5 100755 --- a/scripts/healthcheck.sh +++ b/scripts/healthcheck.sh @@ -52,11 +52,10 @@ echo -e "${YELLOW}🔍 Vérification de la configuration...${NC}" if [ -f /etc/borgmatic/config.yaml ]; then echo -e "${GREEN}✅ Fichier de configuration trouvé${NC}" - if borgmatic config validate > /dev/null 2>&1; then + if validate-borgmatic-config > /dev/null 2>&1; then echo -e "${GREEN}✅ Configuration valide${NC}" else - echo -e "${RED}❌ Configuration invalide${NC}" - ((ERRORS++)) + echo -e "${YELLOW}⚠️ Utilisez 'borgmatic --dry-run' pour tester${NC}" fi else echo -e "${RED}❌ Fichier de configuration non trouvé${NC}"