initial commit
This commit is contained in:
148
QUICKSTART.md
Normal file
148
QUICKSTART.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# Guide de démarrage rapide - Borgmatic
|
||||
|
||||
Installation et configuration en 5 minutes.
|
||||
|
||||
## Installation rapide
|
||||
|
||||
```bash
|
||||
# 1. Cloner le dépôt (si pas déjà fait)
|
||||
git clone <url-du-repo>
|
||||
cd agence66-borgmatic
|
||||
|
||||
# 2. Configurer les variables d'environnement
|
||||
cp .env.example .env
|
||||
nano .env # Éditer avec vos valeurs (voir ci-dessous)
|
||||
|
||||
# 3. Installer
|
||||
sudo ./install.sh
|
||||
```
|
||||
|
||||
## Configuration .env
|
||||
|
||||
Éditez `.env` avec vos valeurs :
|
||||
|
||||
```bash
|
||||
# Repository Borg
|
||||
BORG_REPO=/chemin/vers/votre/repo
|
||||
# ou pour un repo distant:
|
||||
# BORG_REPO=ssh://user@backup-server.com/path/to/repo
|
||||
|
||||
# Passphrase de chiffrement
|
||||
BORG_PASSPHRASE=votre-passphrase-securisee
|
||||
|
||||
# Notifications ntfy
|
||||
NTFY_URL=https://ntfy.sh/votre-topic
|
||||
NTFY_USER=username:password
|
||||
```
|
||||
|
||||
## Initialiser le repository (si nouveau)
|
||||
|
||||
```bash
|
||||
# Repository local
|
||||
borg init --encryption=repokey-blake2 /path/to/repo
|
||||
|
||||
# Repository distant
|
||||
borg init --encryption=repokey-blake2 ssh://user@server/path/to/repo
|
||||
|
||||
# IMPORTANT: Sauvegarder la clé !
|
||||
borg key export /path/to/repo backup-key.txt
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
```bash
|
||||
# 1. Tester les notifications
|
||||
./scripts/test-notifications.sh
|
||||
|
||||
# 2. Vérifier la santé du système
|
||||
sudo ./scripts/healthcheck.sh
|
||||
|
||||
# 3. Test à vide (dry-run)
|
||||
sudo borgmatic --dry-run --verbosity 2
|
||||
|
||||
# 4. Premier backup réel
|
||||
sudo borgmatic --verbosity 1
|
||||
```
|
||||
|
||||
## Vérifier le timer
|
||||
|
||||
```bash
|
||||
# Vérifier que le timer est actif
|
||||
systemctl status borgmatic.timer
|
||||
|
||||
# Voir quand le prochain backup aura lieu
|
||||
systemctl list-timers | grep borgmatic
|
||||
```
|
||||
|
||||
## Commandes utiles
|
||||
|
||||
```bash
|
||||
# Lister les backups
|
||||
borgmatic list
|
||||
|
||||
# Voir les logs
|
||||
journalctl -u borgmatic.service -f
|
||||
|
||||
# Exécuter un backup manuel
|
||||
sudo borgmatic
|
||||
|
||||
# Restaurer des fichiers
|
||||
./scripts/restore.sh
|
||||
|
||||
# Vérifier l'intégrité
|
||||
sudo borgmatic check
|
||||
```
|
||||
|
||||
## Compatibilité avec ancien script
|
||||
|
||||
Si vous migriez depuis l'ancien script Borg :
|
||||
|
||||
1. Votre repository existant **est compatible**
|
||||
2. Les archives existantes **restent accessibles**
|
||||
3. Le format de nommage **est identique**
|
||||
4. Aucune migration n'est nécessaire
|
||||
|
||||
Pour vérifier :
|
||||
|
||||
```bash
|
||||
# Lister les anciennes archives
|
||||
borg list $BORG_REPO
|
||||
|
||||
# Tester avec borgmatic
|
||||
borgmatic list
|
||||
```
|
||||
|
||||
## Migration depuis ancien repository
|
||||
|
||||
Si vous avez un repository Borg existant, il suffit de :
|
||||
|
||||
```bash
|
||||
# 1. Pointer BORG_REPO vers votre repository existant dans .env
|
||||
BORG_REPO=/path/to/existing/repo
|
||||
|
||||
# 2. Utiliser la même passphrase
|
||||
BORG_PASSPHRASE=votre-ancienne-passphrase
|
||||
|
||||
# 3. Tester
|
||||
borgmatic list # Devrait afficher vos anciennes archives
|
||||
```
|
||||
|
||||
## En cas de problème
|
||||
|
||||
```bash
|
||||
# Vérifier la santé
|
||||
sudo ./scripts/healthcheck.sh
|
||||
|
||||
# Voir les logs
|
||||
journalctl -u borgmatic.service -n 50
|
||||
|
||||
# Tester la configuration
|
||||
borgmatic config validate
|
||||
|
||||
# Mode verbeux
|
||||
sudo borgmatic --verbosity 2
|
||||
```
|
||||
|
||||
## Support
|
||||
|
||||
Consultez le [README.md](README.md) pour plus de détails.
|
||||
Reference in New Issue
Block a user