fix deprecated config validation

This commit is contained in:
BeauTroll
2025-12-16 05:17:57 +01:00
parent 58e101bd6d
commit fc8c413599
5 changed files with 9 additions and 13 deletions

View File

@@ -21,7 +21,7 @@ install: ## Installe Borgmatic et configure le système
test-config: ## Valide la configuration Borgmatic test-config: ## Valide la configuration Borgmatic
@echo "$(BLUE)Validation de la configuration...$(NC)" @echo "$(BLUE)Validation de la configuration...$(NC)"
borgmatic config validate @validate-borgmatic-config || borgmatic --dry-run -v 0
test-notifications: ## Teste les notifications ntfy test-notifications: ## Teste les notifications ntfy
@echo "$(BLUE)Test des notifications ntfy...$(NC)" @echo "$(BLUE)Test des notifications ntfy...$(NC)"

View File

@@ -136,8 +136,8 @@ sudo ./scripts/healthcheck.sh
# Voir les logs # Voir les logs
journalctl -u borgmatic.service -n 50 journalctl -u borgmatic.service -n 50
# Tester la configuration # Tester la configuration (avec dry-run)
borgmatic config validate borgmatic --dry-run
# Mode verbeux # Mode verbeux
sudo borgmatic --verbosity 2 sudo borgmatic --verbosity 2

View File

@@ -141,10 +141,7 @@ borg key export /path/to/repo backup-key.txt
### Tester la configuration ### Tester la configuration
```bash ```bash
# Valider la configuration # Valider la configuration (avec dry-run)
borgmatic config validate
# Dry-run (simulation)
borgmatic --dry-run --verbosity 2 borgmatic --dry-run --verbosity 2
# Lister les fichiers qui seront sauvegardés # Lister les fichiers qui seront sauvegardés

View File

@@ -114,11 +114,11 @@ else
fi fi
# Test de la configuration (sans exécuter de backup) # 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}" echo -e "${GREEN}✅ Configuration valide${NC}"
else else
echo -e "${YELLOW}⚠️ La configuration nécessite des ajustements${NC}" echo -e "${YELLOW}⚠️ Validation de la configuration...${NC}"
echo -e "${YELLOW} Vérifiez /etc/borgmatic/config.yaml${NC}" echo -e "${YELLOW} Testez avec: borgmatic --dry-run${NC}"
fi fi
# 7. Affichage des prochaines étapes # 7. Affichage des prochaines étapes

View File

@@ -52,11 +52,10 @@ echo -e "${YELLOW}🔍 Vérification de la configuration...${NC}"
if [ -f /etc/borgmatic/config.yaml ]; then if [ -f /etc/borgmatic/config.yaml ]; then
echo -e "${GREEN}✅ Fichier de configuration trouvé${NC}" 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}" echo -e "${GREEN}✅ Configuration valide${NC}"
else else
echo -e "${RED}❌ Configuration invalide${NC}" echo -e "${YELLOW}⚠️ Utilisez 'borgmatic --dry-run' pour tester${NC}"
((ERRORS++))
fi fi
else else
echo -e "${RED}❌ Fichier de configuration non trouvé${NC}" echo -e "${RED}❌ Fichier de configuration non trouvé${NC}"