nethserver_101_cahier_11_nethserver_backuppc
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | |||
nethserver_101_cahier_11_nethserver_backuppc [2019-10-02 21:12] – michelandre | nethserver_101_cahier_11_nethserver_backuppc [2025-01-12 19:30] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | \\ | ||
+ | [[cours_nethserver_101|{{ Images_Cahier-101-11-000.png? | ||
+ | \\ | ||
+ | ====== Description générale ====== | ||
+ | ===== Introduction ===== | ||
+ | |||
+ | Le **Cahier-10: | ||
+ | |||
+ | Ce cahier est basé sur les pages Web suivantes: | ||
+ | https:// | ||
+ | https:// | ||
+ | https:// | ||
+ | |||
+ | //Page officielle de BackupPC:// https:// | ||
+ | |||
+ | // | ||
+ | // | ||
+ | Il est utilisé pour sauvegarder sur disque un ensemble de postes clients et de serveurs, sous Unix, Linux, Windows ou Mac OS X. Les protocoles utilisables pour les transferts sont : //SMB//, //tar over SSH/ | ||
+ | |||
+ | ===== But de ce cahier ===== | ||
+ | |||
+ | <WRAP centeralign>// | ||
+ | \\ | ||
+ | {{ Images_Cahier-101-11-002.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Cours NethServer-101 ===== | ||
+ | |||
+ | Le //Cours NethServer-101//, | ||
+ | |||
+ | - [[nethserver_101_cahier_01_linux|Cahier-01]]: | ||
+ | - [[nethserver_101_cahier_02_installations_configurations_logiciels_prerequis|Cahier-02]]: | ||
+ | - [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | - [[nethserver_101_cahier_04_local_certificat_let_encrypt|Cahier-04]]: | ||
+ | - [[nethserver_101_cahier_05_vdsl_fqdn_internet_et_nethserver|Cahier-05]]: | ||
+ | // | ||
+ | - [[nethserver_101_cahier_06_nethserver_wordPress|Cahier-06]]: | ||
+ | - [[nethserver_101_cahier_07_nethserver_wordPress_wordfence|Cahier-07]]: | ||
+ | - [[nethserver_101_cahier_08_woocommerce_paypal_stripe|Cahier-08]]: | ||
+ | - [[nethserver_101_cahier_09_duplicator_migration|Cahier-09]]: | ||
+ | - [[nethserver_101_cahier_10_mandataire_inverse|Cahier-10]]: | ||
+ | - [[nethserver_101_cahier_11_nethserver_backuppc|Cahier-11]]: | ||
+ | |||
+ | ==== Cours NethServer-201 ==== | ||
+ | |||
+ | Le //Cours NethServer-201// | ||
+ | |||
+ | - [[nethserver_201_cahier_01_nethserver_et_dolibarr|Cahier-201-01]]: | ||
+ | - [[nethserver_201_cahier_02_odoo_12|Cahier-201-02]]: | ||
+ | - [[nethserver_201_cahier_03_mediawiki|Cahier-201-03]]: | ||
+ | - [[nethserver_201_cahier_04_dokuwiki|Cahier-201-04]]: | ||
+ | - [[nethserver_201_cahier_05_moodle|Cahier-201-05]]: | ||
+ | - [[nethserver_201_cahier_06_proxmox|Cahier-201-06]]: | ||
+ | - [[nethserver_201_cahier_07_flectra|Cahier-201-07]]: | ||
+ | |||
+ | ==== Logiciels ==== | ||
+ | |||
+ | Tous les logiciels nécessaires sont du domaine public ou LIBRE sous licence //GPL//; ils ne coûtent pas un sou. Le seul achat nécessaire est l' | ||
+ | |||
+ | ==== But final ==== | ||
+ | |||
+ | Après avoir suivi le //Cours NethServer-101//, | ||
+ | |||
+ | {{ NS-101_001_Diagramme.png? | ||
+ | |||
+ | ===== Particularités de ce document ===== | ||
+ | |||
+ | ==== Notes au lecteur ==== | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | ==== Conventions ==== | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | {{Images_icone-201-002_Lumiere.png? | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | {{Images_icone-201-005_Non-termine.png? | ||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | |||
+ | Toutes les commandes à la console ou à travers //PuTTY// sont précédées d'une invite qui est toujours présente. | ||
+ | |||
+ | < | ||
+ | [root@dorgee ~]# ping 10.10.10.75 -c1 | ||
+ | |||
+ | PING 10.10.10.75 (10.10.10.75) 56(84) bytes of data. | ||
+ | 64 bytes from 10.10.10.75: | ||
+ | |||
+ | --- 10.10.10.75 ping statistics --- | ||
+ | 1 packets transmitted, | ||
+ | rtt min/ | ||
+ | [root@dorgee ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | Commande à exécuter si ce n'est déjà fait. | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | Commande indiquée à titre d' | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====== Prérequis ====== | ||
+ | |||
+ | ===== Machines virtuelles ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | ===== Serveur NethServer ===== | ||
+ | |||
+ | ☐ Pour l' | ||
+ | |||
+ | ☐ Pour l' | ||
+ | |||
+ | ☐ Installation des dernières mises à jour pour NethServer. | ||
+ | |||
+ | ==== Disque de sauvegarde ==== | ||
+ | |||
+ | ☐ Un volume dédié est recommandé //(peut être un simple disque unique ou des disques en RAID)//. | ||
+ | |||
+ | ===== Logiciels prérequis ===== | ||
+ | |||
+ | ☐ Le [[nethserver_101_cahier_02_installations_configurations_logiciels_prerequis|Cahier-02]]: | ||
+ | |||
+ | ====== Installation ====== | ||
+ | |||
+ | ===== Environnement ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | SOURCE est le Serveur NethServer dont on fera une sauvegarde // | ||
+ | |||
+ | DESTINATION est un Serveur NethServer sur lequel on restaurera la sauvegarde du serveur SOURCE et ainsi il en deviendra un clone parfait. | ||
+ | |||
+ | Micronator.org est un Serveur NethServer qui sert de // | ||
+ | |||
+ | {{ Images_Cahier-101-11-003.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Serveur BackupPC ==== | ||
+ | |||
+ | {{ Images_Cahier-101-11-004.png? | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | La marche à suivre pour l' | ||
+ | |||
+ | Les dernières mises à jour NethServer ont été installées. | ||
+ | |||
+ | Un deuxième disque à été créé pour recevoir les sauvegardes. Il n'est que de //25Go// mais est amplement suffisant pour cette démonstration. | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Les marches à suivre pour des sauvegardes de Serveurs NethServer __physiques__ sont __exactement les mêmes__. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Paramètres SSH de tous les serveurs ===== | ||
+ | |||
+ | Vu que: | ||
+ | ● Les sauvegardes se font à travers une connexion //SSH// afin que personne ne puisse copier les données en transit.\\ | ||
+ | ● L' | ||
+ | Il faut donc autoriser les connexions //SSH// pour l' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Sécurité SSH ==== | ||
+ | |||
+ | {{ Images_Cahier-101-11-005.png? | ||
+ | **Tableau de bord -> Sécurité -> SSH**. | ||
+ | |||
+ | //**Port TCP**// | ||
+ | On utilise le port //2222// afin de dérouter un peu plus les indésirables. | ||
+ | |||
+ | ☑ // | ||
+ | Obligatoirement **Coché**, car seul root peut lire tous les fichiers à sauvegarder. | ||
+ | |||
+ | ☑ // | ||
+ | **Coché**, car les sauvegardes de // | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Services réseau sshd (SSH) ==== | ||
+ | |||
+ | **Sécurité -> Services réseau ->** vis-à-vis //**sshd (SSH)**// | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-11-006.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-11-007.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | < | ||
+ | sinon, | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== DHCP ==== | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | **Configuration -> DHCP ->** onglet **Serveur DHCP**. | ||
+ | |||
+ | ☐ Décocher **enp0s3 - green**. | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-11-008.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Disque de stockage des sauvegardes ===== | ||
+ | |||
+ | Statut actuel des disques et partitions du système de fichiers NethServer. Le disque de stockage n'a encore aucune partition. | ||
+ | |||
+ | < | ||
+ | [root@dev ~]# cat /etc/fstab | ||
+ | |||
+ | # | ||
+ | # /etc/fstab | ||
+ | # Created by anaconda on Fri Jan 4 14:13:25 2019 | ||
+ | # | ||
+ | # Accessible filesystems, | ||
+ | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info | ||
+ | # | ||
+ | / | ||
+ | UUID=a7c532b2-51d2-419a-ab83-b87d08f8205a /boot | ||
+ | / | ||
+ | [root@dev ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Création d'une partition principale sur le disque de stockage ==== | ||
+ | |||
+ | Les sauvegardes devraient toujours être sur un volume séparé.\\ | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | Dans ce Cahier, on utilise un disque entier ayant une simple partition primaire: ''/ | ||
+ | |||
+ | Recherche du dispositif(( **Dispositif**: | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat / | ||
+ | |||
+ | major minor # | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 11 0 1048575 sr0 | ||
+ | | ||
+ | | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | Le disque est ''/ | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als /dev/sdb | ||
+ | |||
+ | 0 brw-rw---- 1 root disk 8, 16 Mar 16 10:41 /dev/sdb | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On lance '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# fdisk /dev/sdb | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On affiche l'aide en entrant " | ||
+ | |||
+ | < | ||
+ | Commande (m pour l' | ||
+ | |||
+ | Commande d' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Commande (m pour l' | ||
+ | </ | ||
+ | |||
+ | On vérifie s'il existe déjà une partition, " | ||
+ | |||
+ | < | ||
+ | Commande (m pour l' | ||
+ | |||
+ | Disque /dev/sdb : 26.8 Go, 26843545600 octets, 52428800 secteurs | ||
+ | Unités = secteur de 1 × 512 = 512 octets | ||
+ | Taille de secteur (logique / physique) : 512 octets / 512 octets | ||
+ | taille d'E/S (minimale / optimale) : 512 octets / 512 octets | ||
+ | Type d' | ||
+ | Identifiant de disque : 0xd808ba5c | ||
+ | |||
+ | Périphérique Amorçage | ||
+ | |||
+ | Commande (m pour l' | ||
+ | </ | ||
+ | |||
+ | Il n'y a pas de partition sur le disque.\\ | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | On crée la partition: | ||
+ | |||
+ | < | ||
+ | Commande (m pour l' | ||
+ | |||
+ | Commande d' | ||
+ | | ||
+ | | ||
+ | p [Entrée] | ||
+ | Numéro de partition (1-4): 1 [Entrée] | ||
+ | Premier secteur (2048-52428799, | ||
+ | Utilisation de la valeur 2048 par défaut | ||
+ | Dernier secteur, +secteur ou +taille{K, | ||
+ | Utilisation de la valeur 52428799 par défaut | ||
+ | La partition 1 de type Linux et de taille 25 GiB est configurée | ||
+ | |||
+ | Commande (m pour l' | ||
+ | </ | ||
+ | |||
+ | On enregistre les nouveaux paramètres et on quitte " | ||
+ | |||
+ | < | ||
+ | Commande (m pour l' | ||
+ | |||
+ | La table de partitions a été altérée! | ||
+ | |||
+ | Appel de ioctl() pour relire la table de partitions. | ||
+ | Synchronisation des disques. | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat / | ||
+ | |||
+ | major minor # | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 11 0 1048575 sr0 | ||
+ | | ||
+ | | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie encore une fois. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als /dev/sdb1 | ||
+ | |||
+ | 0 brw-rw---- 1 root disk 8, 17 16 mars 11:24 /dev/sdb1 | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Création du système de fichiers ext4 sur la partition ==== | ||
+ | |||
+ | === Remarque sur les inodes === | ||
+ | |||
+ | En plus de l' | ||
+ | |||
+ | Pour notre machine, avec un système de fichiers //ext3//, le nombre d' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Voici, sur un système déjà existant, les infos de l' | ||
+ | |||
+ | === Espace disque === | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@backuppc ~]# df -h | ||
+ | |||
+ | Sys. de fichiers | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs 1,9G | ||
+ | tmpfs 1,9G 8,7M 1,9G 1% /run | ||
+ | tmpfs 1,9G | ||
+ | / | ||
+ | tmpfs 379M | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Environ //2.5 Go// d' | ||
+ | |||
+ | === Nombre d' | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@backuppc ~]# df -i | ||
+ | |||
+ | Sys. de fichiers | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs 485058 | ||
+ | tmpfs 485058 | ||
+ | tmpfs 485058 | ||
+ | / | ||
+ | tmpfs 485058 | ||
+ | |||
+ | |||
+ | Filesystem | ||
+ | / | ||
+ | | ||
+ | tmpfs 490294 | ||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Comme on le voit ci-dessus, le nombre d' | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | === Paramètres de la commande mkfs.ext4 === | ||
+ | |||
+ | **-N** //**nombre d' | ||
+ | |||
+ | Remplace le calcul par défaut du nombre d' | ||
+ | |||
+ | Ce paramètre permet à l' | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | **-b** // | ||
+ | |||
+ | Spécifie, en octets, la taille des blocs. Les tailles valides sont: //1024//, //2048// et //4096// octets par bloc. Si omis, la taille d'un bloc est déterminée de manière heuristique par la taille et l' | ||
+ | |||
+ | Si la taille d'un bloc est négative alors, '' | ||
+ | |||
+ | Utile pour certains périphériques matériels qui exigent que la taille des blocs soit un multiple de // | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | **-L** // | ||
+ | |||
+ | Configure l' | ||
+ | |||
+ | **-m** // | ||
+ | |||
+ | Indique le pourcentage de blocs du système de fichiers réservés pour le superutilisateur. Permet d' | ||
+ | |||
+ | La valeur par défaut est de //5 %//. | ||
+ | |||
+ | On crée un système de fichiers //ext4// sur le nouveau volume ''/ | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# mkfs.ext4 | ||
+ | |||
+ | mke2fs 1.42.9 (28-Dec-2013) | ||
+ | Étiquette de système de fichiers=SAUVEGARDE | ||
+ | Type de système d' | ||
+ | Taille de bloc=1024 (log=0) | ||
+ | Taille de fragment=1024 (log=0) | ||
+ | « Stride » = 0 blocs, « Stripe width » = 0 blocs | ||
+ | 15001600 i-noeuds, 26213376 blocs | ||
+ | 262133 blocs (1.00%) réservés pour le super utilisateur | ||
+ | Premier bloc de données=1 | ||
+ | Nombre maximum de blocs du système de fichiers=59768832 | ||
+ | 3200 groupes de blocs | ||
+ | 8192 blocs par groupe, 8192 fragments par groupe | ||
+ | 4688 i-noeuds par groupe | ||
+ | Superblocs de secours stockés sur les blocs : | ||
+ | 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553, | ||
+ | 1024001, 1990657, 2809857, 5120001, 5971969, 17915905, 19668993, | ||
+ | 25600001 | ||
+ | |||
+ | Allocation des tables de groupe : complété | ||
+ | Écriture des tables d' | ||
+ | Création du journal (32768 blocs) : complété | ||
+ | Écriture des superblocs et de l' | ||
+ | fichiers : complété | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Montage du nouveau volume ==== | ||
+ | |||
+ | === Point de montage === | ||
+ | |||
+ | On crée un point de montage // | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# mkdir -p / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -alsd / | ||
+ | |||
+ | 0 drwxr-xr-x 2 root root 6 16 mars 11:37 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === Ajout dans fstab === | ||
+ | |||
+ | On ajoute le point de montage dans ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat >> /etc/fstab <<' | ||
+ | # Pour le volume de stockage des sauvegardes de BackupPC | ||
+ | / | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# tail -n 5 /etc/fstab | ||
+ | |||
+ | UUID=a7c532b2-51d2-419a-ab83-b87d08f8205a /boot | ||
+ | / | ||
+ | # Pour le volume de stockage des sauvegardes de BackupPC | ||
+ | / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Montage du volume dans / | ||
+ | |||
+ | On remonte tous les volumes en relisant '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# mount -a | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie avec mount. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# mount | grep BackupPC | ||
+ | |||
+ | /dev/sdb1 on / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie avec '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -h | ||
+ | |||
+ | Sys. de fichiers | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs 1,9G | ||
+ | tmpfs 1,9G 8,7M 1,9G 1% /run | ||
+ | tmpfs 1,9G | ||
+ | / | ||
+ | tmpfs 379M | ||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Espace disque en spécifiant le nombre d' | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Création des liens symboliques ===== | ||
+ | |||
+ | Cette partie est facultative, | ||
+ | |||
+ | Avec ces commandes, tous les fichiers liés à // | ||
+ | |||
+ | On crée les sous-répertoires '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# mkdir -p / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | [root@backuppc ~]# ls -als / | ||
+ | |||
+ | < | ||
+ | total 19 | ||
+ | 1 drwxr-xr-x | ||
+ | 4 drwxr-xr-x. 52 root root 4096 16 mars 11:37 .. | ||
+ | 1 drwxr-xr-x | ||
+ | 1 drwxr-xr-x | ||
+ | 12 drwx------ | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | Pour les configurations, | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ln -s / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als / | ||
+ | |||
+ | 0 lrwxrwxrwx 1 root root 21 16 mars 12:30 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | Pour les journaux, on crée un lien ''/ | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ln -s / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als / | ||
+ | |||
+ | 0 lrwxrwxrwx 1 root root 21 16 mars 12:31 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Installation du module BackupPC ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | ==== Espace disque et nombre d' | ||
+ | |||
+ | === Espace disque === | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -h | ||
+ | |||
+ | Sys. de fichiers | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs 1,9G | ||
+ | tmpfs 1,9G 8,8M 1,9G 1% /run | ||
+ | tmpfs 1,9G | ||
+ | / | ||
+ | tmpfs 379M | ||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | === Nombre d' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -i | ||
+ | |||
+ | Sys. de fichiers | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs 485058 | ||
+ | tmpfs 485058 | ||
+ | tmpfs 485058 | ||
+ | / | ||
+ | tmpfs 485058 | ||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Référentiel stephdl ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | === Installation du référentiel stephdl === | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# yum install -y http:// | ||
+ | |||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale | ||
+ | ... | ||
+ | Installé : | ||
+ | nethserver-stephdl.noarch 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Installation du module ==== | ||
+ | |||
+ | Nous installation le module // | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# yum install -y nethserver-BackupPC --enablerepo=stephdl | ||
+ | |||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 6.2 M | ||
+ | Taille d' | ||
+ | Downloading packages: | ||
+ | (1/30): libarchive-3.1.2-10.el7_2.x86_64.rpm | ||
+ | ... | ||
+ | (30/30): BackupPC-3.3.1-5.el7.x86_64.rpm | ||
+ | ... | ||
+ | Installé : | ||
+ | nethserver-BackupPC.noarch 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | BackupPC.x86_64 0: | ||
+ | bzip2.x86_64 0: | ||
+ | libarchive.x86_64 0: | ||
+ | perl-Archive-Zip.noarch 0: | ||
+ | perl-CGI.noarch 0: | ||
+ | perl-Class-Load.noarch 0: | ||
+ | perl-Class-Singleton.noarch 0: | ||
+ | perl-Data-OptList.noarch 0: | ||
+ | perl-DateTime.x86_64 2: | ||
+ | perl-DateTime-Format-Mail.noarch 0: | ||
+ | perl-DateTime-Format-W3CDTF.noarch 0: | ||
+ | perl-DateTime-Locale.noarch 0: | ||
+ | perl-DateTime-TimeZone.noarch 0: | ||
+ | perl-FCGI.x86_64 1: | ||
+ | perl-File-RsyncP.x86_64 0: | ||
+ | perl-Module-Implementation.noarch 0: | ||
+ | perl-Module-Runtime.noarch 0: | ||
+ | perl-Net-FTP-AutoReconnect.noarch 0: | ||
+ | perl-Net-FTP-RetrHandle.noarch 0: | ||
+ | perl-Package-DeprecationManager.noarch 0: | ||
+ | perl-Package-Stash.noarch 0: | ||
+ | perl-Package-Stash-XS.x86_64 0: | ||
+ | perl-Params-Util.x86_64 0: | ||
+ | perl-Params-Validate.x86_64 0: | ||
+ | perl-Sub-Install.noarch 0: | ||
+ | perl-Time-ParseDate.noarch 0: | ||
+ | perl-Try-Tiny.noarch 0: | ||
+ | perl-XML-RSS.noarch 0: | ||
+ | samba-client.x86_64 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Utilisateur backuppc ==== | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat /etc/passwd | grep backuppc | ||
+ | |||
+ | backuppc: | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | Comme on le voit, l' | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Usage ===== | ||
+ | |||
+ | Une fois le module BackupPC installé, l’utilisateur cgi administrateur de // | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | On affiche les propriétés de // | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# config show backuppc | ||
+ | |||
+ | backuppc=service | ||
+ | CgiMultiUser=enabled | ||
+ | examples=enabled | ||
+ | status=enabled | ||
+ | sudo=/ | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Mise à jour vers BackupPC-4.3.0 ====== | ||
+ | |||
+ | ===== Prérequis ===== | ||
+ | |||
+ | Certain logiciels doivent être installés avant la mise à jour vers la version BackupPC-4.3.0. | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# yum install -y gcc \ | ||
+ | perl-devel perl-CPAN perl-CGI | ||
+ | mod_ssl nfs-utils | ||
+ | bzip2 glusterfs-client | ||
+ | |||
+ | ... | ||
+ | |||
+ | Le paquet perl-CGI-3.63-4.el7.noarch est déjà installé dans sa dernière version | ||
+ | Le paquet 1: | ||
+ | Le paquet 1: | ||
+ | Le paquet bzip2-1.0.6-13.el7.x86_64 est déjà installé dans sa dernière version | ||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 36 M | ||
+ | Taille d' | ||
+ | Downloading packages: | ||
+ | (1/24): attr-2.4.46-13.el7.x86_64.rpm | ||
+ | ... | ||
+ | (24/24): gcc-4.8.5-36.el7.x86_64.rpm | ||
+ | ... | ||
+ | Installé : | ||
+ | gcc.x86_64 0: | ||
+ | perl-CPAN.noarch 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | ... | ||
+ | cpp.x86_64 0: | ||
+ | ... | ||
+ | kernel-headers.x86_64 0: | ||
+ | ... | ||
+ | |||
+ | Terminé ! | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Configuration de CPAN ==== | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cpan | ||
+ | |||
+ | CPAN.pm requires configuration, | ||
+ | If you answer ' | ||
+ | configuration option instead. | ||
+ | |||
+ | Would you like to configure as much as possible automatically? | ||
+ | |||
+ | < | ||
+ | |||
+ | Warning: You do not have write permission for Perl library directories. | ||
+ | |||
+ | To install modules, you need to configure a local Perl library directory or | ||
+ | escalate your privileges. | ||
+ | module or by configuring itself to use ' | ||
+ | resolve this problem manually if you need to customize your setup. | ||
+ | |||
+ | What approach do you want? (Choose ' | ||
+ | | ||
+ | |||
+ | Autoconfigured everything but ' | ||
+ | |||
+ | Now you need to choose your CPAN mirror sites. | ||
+ | pick mirrors for you, you can select them from a list or you | ||
+ | can enter them by hand. | ||
+ | |||
+ | Would you like me to automatically choose some CPAN mirror | ||
+ | sites for you? (This means connecting to the Internet) [yes] | ||
+ | Trying to fetch a mirror list from the Internet | ||
+ | Fetching with LWP: | ||
+ | http:// | ||
+ | Fetching with LWP: | ||
+ | http:// | ||
+ | Fetching with LWP: | ||
+ | ftp:// | ||
+ | |||
+ | Looking for CPAN mirrors near you (please be patient) | ||
+ | .......................... done! | ||
+ | |||
+ | New urllist | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | |||
+ | Autoconfiguration complete. | ||
+ | |||
+ | commit: wrote '/ | ||
+ | |||
+ | You can re-run configuration any time with 'o conf init' in the CPAN shell | ||
+ | Terminal does not support AddHistory. | ||
+ | |||
+ | cpan shell -- CPAN exploration and modules installation (v1.9800) | ||
+ | Enter ' | ||
+ | |||
+ | cpan[1]> | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Test::More ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | < | ||
+ | cpan[1]> install Test::More | ||
+ | |||
+ | Fetching with LWP: | ||
+ | ... | ||
+ | Fetching with LWP: | ||
+ | ... | ||
+ | CPAN.pm: Building E/ | ||
+ | |||
+ | Checking if your kit is complete... | ||
+ | Looks good | ||
+ | Writing Makefile for Test:: | ||
+ | ... | ||
+ | Manifying blib/ | ||
+ | ... | ||
+ | Running make test | ||
+ | ... | ||
+ | All tests successful. | ||
+ | Files=230, Tests=2615, 34 wallclock secs ( 1.32 usr 0.59 sys + 22.71 cusr 4.76 csys = 29.38 CPU) | ||
+ | Result: PASS | ||
+ | ... | ||
+ | EXODIST/ | ||
+ | sudo / | ||
+ | |||
+ | cpan[2]> | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Module version ==== | ||
+ | |||
+ | Le module **version** récupère la version de tout autre module. | ||
+ | |||
+ | < | ||
+ | cpan[2]> install version | ||
+ | |||
+ | Running install for module ' | ||
+ | |||
+ | ... | ||
+ | |||
+ | Testing if you have a C compiler | ||
+ | |||
+ | Checking if your kit is complete... | ||
+ | |||
+ | Looks good | ||
+ | |||
+ | ... | ||
+ | |||
+ | All tests successful. | ||
+ | |||
+ | Test Summary Report | ||
+ | |||
+ | ------------------- | ||
+ | |||
+ | t/ | ||
+ | |||
+ | TODO passed: | ||
+ | |||
+ | Files=12, Tests=2502, | ||
+ | |||
+ | Result: PASS | ||
+ | |||
+ | ... | ||
+ | |||
+ | Appending installation info to / | ||
+ | |||
+ | | ||
+ | |||
+ | sudo / | ||
+ | |||
+ | cpan[3]> | ||
+ | </ | ||
+ | |||
+ | On quitte //cpan//. | ||
+ | |||
+ | < | ||
+ | cpan[3]> quit | ||
+ | |||
+ | Terminal does not support GetHistory. | ||
+ | Lockfile removed. | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Mise à jour ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | ==== Téléchargements ==== | ||
+ | |||
+ | On crée un répertoire de travail. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# mkdir / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On s'y rend. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cd / | ||
+ | |||
+ | [root@backuppc BackupPC]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === BackupPC 4.3.0 === | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC]# wget https:// | ||
+ | |||
+ | ... | ||
+ | requête HTTP transmise, en attente de la réponse...200 OK | ||
+ | Longueur: 637725 (623K) [application/ | ||
+ | Sauvegarde en : «BackupPC-4.3.0.tar.gz» | ||
+ | |||
+ | 100%[==================================================> | ||
+ | |||
+ | 2019-03-19 01:46:25 (296 KB/s) - «BackupPC-4.3.0.tar.gz» sauvegardé [637725/ | ||
+ | |||
+ | [root@backuppc BackupPC]# | ||
+ | </ | ||
+ | |||
+ | On extrait le fichier. | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC]# tar -zxvf BackupPC-4.3.0.tar.gz | ||
+ | |||
+ | BackupPC-4.3.0/ | ||
+ | ... | ||
+ | BackupPC-4.3.0/ | ||
+ | [root@backuppc BackupPC]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === BackupPC-XS 0.58 === | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC]# wget https:// | ||
+ | |||
+ | ... | ||
+ | requête HTTP transmise, en attente de la réponse...200 OK | ||
+ | Longueur: 288074 (281K) [application/ | ||
+ | Sauvegarde en : «BackupPC-XS-0.58.tar.gz» | ||
+ | |||
+ | 100%[==================================================> | ||
+ | |||
+ | 2019-03-19 01:44:01 (248 KB/s) - «BackupPC-XS-0.58.tar.gz» sauvegardé [288074/ | ||
+ | |||
+ | [root@backuppc BackupPC]# | ||
+ | </ | ||
+ | |||
+ | On extrait le fichier. | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC]# tar -zxvf BackupPC-XS-0.58.tar.gz | ||
+ | |||
+ | BackupPC-XS-0.58/ | ||
+ | ... | ||
+ | BackupPC-XS-0.58/ | ||
+ | [root@backuppc BackupPC]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === rsync-bpc === | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | Site de téléchargement: | ||
+ | |||
+ | {{ Images_Cahier-101-11-009.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | On extrait le fichier ZIP. | ||
+ | |{{ Images_Cahier-101-11-010.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | On téléverse le __répertoire rsync-bpc-3.1.2__ dans ''/ | ||
+ | |{{ Images_Cahier-101-11-011.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | On vérifie le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC]# ls -ls | ||
+ | |||
+ | total 916 | ||
+ | 0 drwxr-xr-x 10 317 317 177 25 nov. 16:56 BackupPC-4.3.0 | ||
+ | 624 -rw-r--r-- | ||
+ | 4 drwxr-xr-x | ||
+ | 284 -rw-r--r-- | ||
+ | 4 drwxr-xr-x 11 root root 4096 19 mars 02:10 rsync-bpc-3.1.2 | ||
+ | [root@backuppc BackupPC]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Installation des logiciels ==== | ||
+ | |||
+ | === BackupPC-XS === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC]# cd BackupPC-XS-0.58 | ||
+ | |||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | </ | ||
+ | |||
+ | On lance le '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | |||
+ | Checking if your kit is complete... | ||
+ | Looks good | ||
+ | Writing Makefile for BackupPC:: | ||
+ | Writing Makefile for BackupPC:: | ||
+ | Writing Makefile for BackupPC:: | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | </ | ||
+ | |||
+ | On lance le '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | |||
+ | cp lib/ | ||
+ | ./ | ||
+ | configure.sh: | ||
+ | ... | ||
+ | chmod 755 blib/ | ||
+ | cp XS.bs blib/ | ||
+ | chmod 644 blib/ | ||
+ | Manifying blib/ | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | </ | ||
+ | |||
+ | On teste. | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | |||
+ | ... | ||
+ | All tests successful. | ||
+ | Files=1, Tests=1, | ||
+ | Result: PASS | ||
+ | make[1] : on entre dans le répertoire « / | ||
+ | No tests defined for BackupPC:: | ||
+ | make[1] : on quitte le répertoire « / | ||
+ | make[1] : on entre dans le répertoire « / | ||
+ | No tests defined for BackupPC:: | ||
+ | make[1] : on quitte le répertoire « / | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | </ | ||
+ | |||
+ | On installe. | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | |||
+ | Files found in blib/arch: installing files in blib/lib into architecture dependent library tree | ||
+ | Installing / | ||
+ | Installing / | ||
+ | Installing / | ||
+ | Installing / | ||
+ | Appending installation info to / | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === rsync-bpc === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC-XS-0.58]# | ||
+ | |||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | | ||
+ | # | ||
+ | ^ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On installe // | ||
+ | |||
+ | < | ||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | |||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 107 k | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installé : | ||
+ | libacl-devel.x86_64 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | libattr-devel.x86_64 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | </ | ||
+ | |||
+ | Vu que nous avons téléversé ce répertoire depuis un poste de travail Windows, le script '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | |||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | </ | ||
+ | |||
+ | On lance la configuration. | ||
+ | |||
+ | < | ||
+ | [root@backuppc rsync-bpc]# ./ | ||
+ | |||
+ | configure.sh: | ||
+ | ... | ||
+ | rsync_bpc 3.1.2.0 configuration successful | ||
+ | |||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | </ | ||
+ | |||
+ | On lance le '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | |||
+ | perl ./ | ||
+ | ... | ||
+ | popt/ | ||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | </ | ||
+ | |||
+ | On installe. | ||
+ | |||
+ | < | ||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | |||
+ | / | ||
+ | / | ||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === BackupPC 4.3.0 === | ||
+ | |||
+ | On se rend dans le répertoire // | ||
+ | |||
+ | < | ||
+ | [root@backuppc rsync-bpc-3.1.2]# | ||
+ | |||
+ | [root@backuppc BackupPC-4.3.0]# | ||
+ | </ | ||
+ | |||
+ | On configure, prenant tous les défauts avec [ENTRÉE]. | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC-4.3.0]# | ||
+ | |||
+ | Found / | ||
+ | existing BackupPC installation. | ||
+ | information, | ||
+ | changes - just hit ENTER to each question. | ||
+ | |||
+ | I found the following locations for these programs: | ||
+ | |||
+ | bzip2 => / | ||
+ | cat => / | ||
+ | df => /usr/bin/df | ||
+ | gtar/ | ||
+ | gzip => / | ||
+ | hostname | ||
+ | nmblookup | ||
+ | par2 => /bin/true | ||
+ | perl => / | ||
+ | ping => / | ||
+ | ping6 => / | ||
+ | rrdtool | ||
+ | rsync => / | ||
+ | rsync_bpc | ||
+ | sendmail | ||
+ | smbclient | ||
+ | split => / | ||
+ | ssh/ | ||
+ | |||
+ | --> Are these paths correct? [y]? [ENTRÉE] | ||
+ | |||
+ | Please tell me the hostname of the machine that BackupPC will run on. | ||
+ | |||
+ | --> BackupPC will run on host [localhost]? | ||
+ | |||
+ | BackupPC should run as a dedicated user with limited privileges. | ||
+ | need to create a user. This user will need read/write permission on | ||
+ | the main data directory and read/ | ||
+ | directory (these directories will be setup shortly). | ||
+ | |||
+ | The primary group for this user should also be chosen carefully. | ||
+ | The data directories and files will have group read permission, | ||
+ | so group members can access backup files. | ||
+ | |||
+ | --> BackupPC should run as user [backuppc]? [ENTRÉE] | ||
+ | |||
+ | Please specify an install directory for BackupPC. | ||
+ | BackupPC scripts, library and documentation will be installed. | ||
+ | |||
+ | --> Install directory (full path) [/ | ||
+ | |||
+ | Please specify a data directory for BackupPC. | ||
+ | PC backup data is stored. | ||
+ | accommodate all the PCs you expect to backup (eg: at least several GB | ||
+ | per machine). | ||
+ | |||
+ | --> Data directory (full path) [/ | ||
+ | |||
+ | BackupPC has SCGI and CGI perl interfaces that run under Apache. | ||
+ | to pick which one to run. | ||
+ | |||
+ | For SCGI, Apache uses the scgi_mod module to communicate with BackupPC_Admin_SCGI, | ||
+ | which handles the requests. | ||
+ | backuppc. | ||
+ | non-privileged TCP port number. | ||
+ | |||
+ | Important security warning!! | ||
+ | anyone untrusted. | ||
+ | BackupPC server, and you should block the SCGIServerPort TCP port from | ||
+ | network access. | ||
+ | |||
+ | The traditional alternative is to use CGI. In this case, an executable needs | ||
+ | to be installed Apache' | ||
+ | set-uid backuppc, or it can be run under mod_perl with Apache | ||
+ | running as user backuppc. | ||
+ | |||
+ | --> SCGI port (-1 to disable) [-1]? [ENTRÉE] | ||
+ | --> CGI bin directory (full path, or empty for no CGI) [/ | ||
+ | |||
+ | BackupPC' | ||
+ | images that should be stored where Apache can serve them. They | ||
+ | should be placed somewhere under Apache' | ||
+ | also needs to know the URL to access these images. | ||
+ | |||
+ | Apache image directory: | ||
+ | URL for image directory: /BackupPC | ||
+ | |||
+ | The URL for the image directory should start with a slash. | ||
+ | |||
+ | --> Apache image directory (full path, or empty for no S/CGI) [/ | ||
+ | --> URL for image directory (omit http:// | ||
+ | |||
+ | Ok, we're about to: | ||
+ | |||
+ | - install the binaries, lib and docs in / | ||
+ | - create the data directory / | ||
+ | - optionally install the cgi-bin interface | ||
+ | - create/ | ||
+ | |||
+ | --> Do you want to continue? [y]? [ENTRÉE] | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Created / | ||
+ | Installing binaries in / | ||
+ | Installing library in / | ||
+ | Installing images in / | ||
+ | Making systemd and init.d scripts | ||
+ | Making Apache configuration file for suid-perl | ||
+ | Installing docs in / | ||
+ | Installing cgi script BackupPC_Admin in / | ||
+ | Installing config.pl and hosts in / | ||
+ | Making backup copy of / | ||
+ | |||
+ | Ok, it looks like we are finished. | ||
+ | will need to do: | ||
+ | |||
+ | - Browse through the config file, / | ||
+ | and make sure all the settings are correct. | ||
+ | you will need to set $Conf{CgiAdminUsers} so you have | ||
+ | administration privileges in the CGI interface. | ||
+ | |||
+ | - Edit the list of hosts to backup in / | ||
+ | |||
+ | - Read the documentation in / | ||
+ | Please pay special attention to the security section. | ||
+ | |||
+ | - Verify that the CGI script BackupPC_Admin runs correctly. | ||
+ | need to change the permissions or group ownership of BackupPC_Admin. | ||
+ | If this is an upgrade and you are using mod_perl, you will need | ||
+ | to restart Apache. | ||
+ | |||
+ | - BackupPC should be ready to start. | ||
+ | as user backuppc! | ||
+ | a systemd/ | ||
+ | that BackupPC can auto-start on boot. This will also enable | ||
+ | administrative users to start the server from the CGI interface. | ||
+ | See systemd/ | ||
+ | |||
+ | Enjoy! | ||
+ | [root@backuppc BackupPC-4.3.0]# | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | Nous retournons dans le répertoire personnel de root. | ||
+ | |||
+ | < | ||
+ | [root@backuppc BackupPC-4.3.0]# | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Désinstallation de gcc ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | Est-ce que '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# rpm -q --whatrequires gcc | ||
+ | |||
+ | aucun paquetage ne requiert gcc | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | |||
+ | Quel version de '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# rpm -qa | grep gcc | ||
+ | |||
+ | gcc-4.8.5-36.el7.x86_64 | ||
+ | libgcc-4.8.5-36.el7.x86_64 | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On désinstalle '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# rpm -e gcc-4.8.5-36.el7.x86_64 | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# rpm -qa | grep gcc | ||
+ | |||
+ | libgcc-4.8.5-36.el7.x86_64 | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | Est-ce que '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# rpm -q --whatrequires | ||
+ | |||
+ | aucun paquet ne requiert libgcc | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | Il n'y a pas de problème à garder '' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Création de l' | ||
+ | |||
+ | {{ Images_Cahier-101-11-012.png? | ||
+ | **Gestion -> Utilisateur et groupe ->** onglet **Utilisateurs -> CRÉER NOUVEAU**. | ||
+ | |||
+ | On entre les informations demandées. | ||
+ | |||
+ | ● On insère l' | ||
+ | |||
+ | ● On s' | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Ajustement des configurations des logiciels ===== | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cp / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als / | ||
+ | |||
+ | 84 -rw-r----- 1 root root 84055 20 mars 01:22 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-013.png? | ||
+ | On édite le fichier: ''/ | ||
+ | |||
+ | On spécifie les utilisateurs qui pourront gérer // | ||
+ | |||
+ | Les utilisateurs __sont séparés par des espaces__. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | # Examples: | ||
+ | # $Conf{CgiAdminUserGroup} = ' | ||
+ | # $Conf{CgiAdminUsers} | ||
+ | # --> administrative users are the union of group admin, plus | ||
+ | # craig and celia. | ||
+ | # | ||
+ | # $Conf{CgiAdminUserGroup} = ''; | ||
+ | # $Conf{CgiAdminUsers} | ||
+ | # --> administrative users are only craig and celia' | ||
+ | # | ||
+ | $Conf{CgiAdminUserGroup} = ''; | ||
+ | ##### Modification par Michel-André 2019-03-18_08h38 | ||
+ | ##### Spécification des utilisateurs qui pourront gérer BackupPC | ||
+ | ##### $Conf{CgiAdminUsers} | ||
+ | $Conf{CgiAdminUsers} = 'admin michelandre'; | ||
+ | |||
+ | # | ||
+ | # TCP port number of the SCGI server. | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat / | ||
+ | |||
+ | ######################### | ||
+ | $Conf{CgiAdminUsers} = 'admin michelandre'; | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | On modifie le fichier de configuration '' | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cp / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als / | ||
+ | |||
+ | 12 -rw-r--r-- 1 root root 11753 20 mars 01:47 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-014.png? | ||
+ | On édite le fichier: | ||
+ | '' | ||
+ | |||
+ | On spécifie que c'est l' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | # If you wish httpd to run as a different user or group, you must run | ||
+ | # httpd as root initially and it will switch. | ||
+ | # | ||
+ | # User/Group: The name (or #number) of the user/group to run httpd as. | ||
+ | # It is usually good practice to create a dedicated user and group for | ||
+ | # running httpd, as with most system services. | ||
+ | # | ||
+ | ##### Modification par Michel-André, | ||
+ | ##### On spécifie que c'est l' | ||
+ | ##### User apache | ||
+ | User backuppc | ||
+ | |||
+ | Group apache | ||
+ | |||
+ | # ' | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat / | ||
+ | |||
+ | ##### On sp▒cifie que c'est l' | ||
+ | User backuppc | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === Propriétaire et groupe === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chown -R backuppc: | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste aussi __R__écursivement le propriétaire et le groupe du répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chown -R backuppc: | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Redémarrage des démons ==== | ||
+ | |||
+ | On redémarre //httpd//. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# systemctl restart httpd.service | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On redémarre // | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# systemctl restart backuppc.service | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Journal ===== | ||
+ | |||
+ | Le principal journal de // | ||
+ | |||
+ | Pour voir les messages des scripts de // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Documentation ===== | ||
+ | |||
+ | La documentation officielle de BackupPC // | ||
+ | \\ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ====== Configuration préliminaire de BackupPC ====== | ||
+ | |||
+ | ===== Clés SSH ===== | ||
+ | |||
+ | Pour préparer un client Linux à être sauvegarder, | ||
+ | |||
+ | Avec l' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als / | ||
+ | |||
+ | total 7 | ||
+ | 1 drwx------ | ||
+ | 1 drwxr-x--- 10 backuppc root 1024 16 mars 14:42 .. | ||
+ | 4 -rw------- | ||
+ | 1 -rw-r--r-- | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | |||
+ | === Différence entre les jeux de clés SSH === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als / | ||
+ | |||
+ | 4 -rw-r----- 1 root ssh_keys 1675 4 janv. 09:23 / | ||
+ | 4 -rw-r--r-- 1 root root 382 4 janv. 09:23 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Téléversement de la clé SSH publique de BackupPC ==== | ||
+ | |||
+ | Téléversement de la clé publique de l' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ssh-copy-id | ||
+ | |||
+ | / | ||
+ | The authenticity of host ' | ||
+ | ECDSA key fingerprint is SHA256: | ||
+ | ECDSA key fingerprint is MD5: | ||
+ | Are you sure you want to continue connecting (yes/no)? yes | ||
+ | / | ||
+ | / | ||
+ | root@10.10.10.75' | ||
+ | |||
+ | Number of key(s) added: 1 | ||
+ | |||
+ | Now try logging into the machine, with: " | ||
+ | and check to make sure that only the key(s) you wanted were added. | ||
+ | |||
+ | [root@backuppc ~] | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Vérification de la connexion sans mot de passe ==== | ||
+ | |||
+ | On se substitue à l' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# su -s /bin/bash backuppc | ||
+ | |||
+ | bash-4.1$ | ||
+ | </ | ||
+ | |||
+ | On vérifie la substitution. | ||
+ | |||
+ | < | ||
+ | bash-4.1$ whoami | ||
+ | |||
+ | backuppc | ||
+ | bash-4.1$ | ||
+ | </ | ||
+ | |||
+ | On vérifie la connexion ssh sans mot de passe vers le serveur SOURCE // | ||
+ | |||
+ | < | ||
+ | bash-4.1$ ssh -p 2222 root@10.10.10.75 | ||
+ | |||
+ | Last login: Sat Mar 16 15:16:59 2019 from tchana.micronator-dev.org | ||
+ | |||
+ | ************ Welcome to NethServer ************ | ||
+ | |||
+ | This is a NethServer installation. | ||
+ | |||
+ | Before editing configuration files, be aware | ||
+ | of the automatic events and templates system. | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | *********************************************** | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | La connexion sans mot de passe fonctionne correctement. | ||
+ | |||
+ | On se désengage de la connexion ssh pour retourner au serveur hôte de // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# exit | ||
+ | |||
+ | logout | ||
+ | Connection to 10.10.10.75 closed. | ||
+ | bash-4.1$ | ||
+ | </ | ||
+ | |||
+ | On sort de la __**su**__bstitution et on revient à l' | ||
+ | |||
+ | < | ||
+ | bash-4.1$ exit | ||
+ | |||
+ | exit | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Scripts pre/post sauvegarde ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | ● // | ||
+ | ● // | ||
+ | \\ | ||
+ | |||
+ | ==== $sshPath ==== | ||
+ | |||
+ | Pour les Serveurs NethServer, le chemin de la commande ssh est toujours le même. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# which ssh | ||
+ | |||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== $host ==== | ||
+ | |||
+ | // | ||
+ | \\ | ||
+ | |||
+ | ==== Répertoire de stockage des scripts ==== | ||
+ | |||
+ | Nous créons un répertoire pour stocker nos scripts. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# mkdir / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chown backuppc: | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste les droits. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chmod 750 / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -lsd / | ||
+ | |||
+ | 1 drwxr-x--- 2 backuppc apache 1024 19 mars 13:05 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== $Conf{DumpPreUserCmd} ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | Dans // | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP column 40%> | ||
+ | ● ''/ | ||
+ | |||
+ | ● '' | ||
+ | </ | ||
+ | <WRAP column 50%> | ||
+ | |{{ Images_Cahier-101-11-015.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Script pre-sauvegarde.sh === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | #!/bin/sh | ||
+ | |||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | # Michel-André, | ||
+ | # | ||
+ | |||
+ | # pre-backup-config pour la sauvegarde de la configuration et de LDAP | ||
+ | / | ||
+ | |||
+ | # Pause de BackupPC | ||
+ | /bin/sleep 15 | ||
+ | |||
+ | # pre-backup-data pour la sauvegarde des données | ||
+ | / | ||
+ | |||
+ | # Pause de BackupPC | ||
+ | /bin/sleep 15 | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat / | ||
+ | |||
+ | #!/bin/sh | ||
+ | |||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | # Michel-André, | ||
+ | # | ||
+ | |||
+ | # pre-backup-config pour la sauvegarde de la configuration et de LDAP | ||
+ | / | ||
+ | |||
+ | # Pause de BackupPC | ||
+ | /bin/sleep 15 | ||
+ | |||
+ | # pre-backup-data pour la sauvegarde des données | ||
+ | / | ||
+ | |||
+ | # Pause de BackupPC | ||
+ | /bin/sleep 15 | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ● // | ||
+ | Indique que c'est un script bash. Doit toujours être obligatoirement la __première ligne__ du script. | ||
+ | |||
+ | ● // | ||
+ | <WRAP indent> | ||
+ | // | ||
+ | Le chemin/nom de l' | ||
+ | |||
+ | //**-l root**// \\ | ||
+ | //(-l login_name)// | ||
+ | |||
+ | // | ||
+ | Le paramètre '' | ||
+ | |||
+ | // | ||
+ | Commandes standard de // | ||
+ | |||
+ | Le " // | ||
+ | </ | ||
+ | |||
+ | |||
+ | ● **/ | ||
+ | Indique au serveur BackupPC de prendre une pause de //15// secondes afin que la commande précédente ait le temps de terminer son travail sur l' | ||
+ | |||
+ | On ajuste le propriétaire et le groupe du script. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chown backuppc: | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste les droits. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chmod 550 / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -ls / | ||
+ | |||
+ | 2 -r-xr-x--- 1 backuppc apache 515 19 mars 13:10 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== $Conf{DumpPostUserCmd} ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Dans // | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | // | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-11-016.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Script post-sauvegarde.sh === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | #!/bin/sh | ||
+ | |||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | # Michel-André, | ||
+ | # | ||
+ | |||
+ | # Commande post-backup-config pour la configuration et LDAP | ||
+ | / | ||
+ | |||
+ | # Pause de BackupPC | ||
+ | /bin/sleep 15 | ||
+ | |||
+ | # Commande post-backup-data pour les données | ||
+ | / | ||
+ | |||
+ | # Pause de BackupPC | ||
+ | /bin/sleep 15 | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat / | ||
+ | |||
+ | #!/bin/sh | ||
+ | |||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | # Michel-André, | ||
+ | # | ||
+ | |||
+ | # Commande post-backup-config pour la configuration et LDAP | ||
+ | / | ||
+ | |||
+ | # Pause de BackupPC | ||
+ | /bin/sleep 15 | ||
+ | |||
+ | # Commande post-backup-data pour les données | ||
+ | / | ||
+ | |||
+ | # Pause de BackupPC | ||
+ | /bin/sleep 15 | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On ajuste le propriétaire et le groupe du script. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chown backuppc: | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste les droits. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chmod 550 / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -ls / | ||
+ | |||
+ | 1 -r-xr-x--- 1 backuppc apache 506 19 mars 13:11 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | **Voilà, la configuration préliminaire de BackupPC est terminée.\\ | ||
+ | Tous nos scripts sont en place, ils ont le bon propriétaire, | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====== Paramètres par défaut de BackupPC ====== | ||
+ | |||
+ | ===== Accès à l' | ||
+ | |||
+ | Il existe deux liens pour accéder à // | ||
+ | |||
+ | https:// | ||
+ | https:// | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | **Tableau de bord NethServer -> Applications -> BackupPC -> Ouvrir**. | ||
+ | |{{ Images_Cahier-101-11-017.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | Après avoir ajouter une exception dans le navigateur utilisé, on entre le justificatif de l' | ||
+ | |{{ Images_Cahier-101-11-018.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-019.png? | ||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Cygwin pour la préparation des clients Windows ==== | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | **Tableau de bord NethServer -> Applications -> Cygwin -> Ouvrir**. | ||
+ | |{{ Images_Cahier-101-11-020.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | Après avoir ajouter une exception dans le navigateur utilisé, on entre le justificatif de l' | ||
+ | |{{ Images_Cahier-101-11-021.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-022.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-023.png? | ||
+ | ===== CGI ===== | ||
+ | |||
+ | ==== Langue de l' | ||
+ | |||
+ | **Edit Config ->** onglet** CGI -> Language ->** on choisit **fr**. | ||
+ | Le bouton // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-024.png? | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-025.png? | ||
+ | L' | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-026.png? | ||
+ | ==== Format de la date ==== | ||
+ | |||
+ | Format d' | ||
+ | |||
+ | **Modifier la configuration ->** onglet **CGI -> CgiDateFormatMMDD**. | ||
+ | |||
+ | La valeur //1// utilise des dates de type US // | ||
+ | |||
+ | On veut un affichage // | ||
+ | |||
+ | On clique Sauvegarder pour enregistrer ce nouveau paramètre. | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-028.png? | ||
+ | ===== Paramètres de sauvegarde ===== | ||
+ | |||
+ | ==== CompressLevel (Niveau de compression) ==== | ||
+ | |||
+ | Il n'y a rien à faire sauf, peut-être, le niveau de compression des sauvegardes; | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-029.png? | ||
+ | ===== Courriel ===== | ||
+ | |||
+ | // | ||
+ | Période minimale entre les courriels consécutifs à un seul utilisateur. Ce paramètre tente de garder les courriels gênants pour les utilisateurs à un niveau raisonnable. La vérification du paramètre du courriel est effectuée tous les soirs, de sorte que ce nombre est effectivement arrondi //(0.97 signifie qu'un utilisateur ne recevra jamais de courriel plus d'une fois tous les 1 jour)//.\\ | ||
+ | Pour recevoir les courriels quotidiennement. {{Images_Cahier-101-11-030.png? | ||
+ | <WRAP clear></ | ||
+ | |||
+ | // | ||
+ | Nom à utiliser pour le champ " | ||
+ | |||
+ | // | ||
+ | Adresse de destination d'un utilisateur administratif qui recevra un courriel tous les soirs avec les avertissements et les erreurs. S'il n'y a pas d' | ||
+ | |||
+ | // | ||
+ | |||
+ | Sujet pour les courriels à l' | ||
+ | |||
+ | // | ||
+ | Nom du domaine de destination pour les courriels envoyés aux utilisateurs. Par défaut, il est vide et signifie que le courriel est envoyé à des adresses simples et non qualifiées. Sinon, définissez ce paramètre avec le domaine de destination, | ||
+ | |||
+ | Avec les paramètres // | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Vérification du courriel ==== | ||
+ | |||
+ | Pour vérifier que // | ||
+ | |||
+ | On se substitue à l' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# su -s /bin/bash backuppc | ||
+ | |||
+ | bash-4.1$ | ||
+ | </ | ||
+ | |||
+ | On envoie le courriel de test. | ||
+ | |||
+ | < | ||
+ | bash-4.1$ / | ||
+ | |||
+ | Sending test email using / | ||
+ | bash-4.1$ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-032.png? | ||
+ | On vérifie le courrier d' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | On se désengage de l' | ||
+ | |||
+ | < | ||
+ | bash-4.1$ exit | ||
+ | |||
+ | exit | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Horaire ===== | ||
+ | |||
+ | {{ Images_Cahier-101-11-033.png? | ||
+ | ==== Sauvegardes Complètes ==== | ||
+ | |||
+ | // | ||
+ | Période minimale en jours, entre les sauvegardes Complètes. Une vidange ne sera effectuée que si au moins ce délai s'est écoulé depuis la dernière sauvegarde Complète et, au moins '' | ||
+ | Généralement, | ||
+ | |||
+ | // | ||
+ | Dans //V4+//, les sauvegardes Complètes/ | ||
+ | |||
+ | Pour imiter le comportement de //V3//, si // | ||
+ | |||
+ | Si vous envisagez d' | ||
+ | |||
+ | Il existe deux raisons pour lesquelles vous voudriez un paramètre // | ||
+ | |||
+ | ● Une sauvegarde fusionnée est un point de départ pour la fusion des deltas lorsque vous restaurez ou examinez des sauvegardes. Avoir périodiquement des sauvegardes fusionnées rend plus efficace l' | ||
+ | |||
+ | ● Plus important encore, dans //V4+// la suppression des sauvegardes se fait en fonction de // | ||
+ | |||
+ | {{ Images_Cahier-101-11-034.png? | ||
+ | Si // | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{ Images_Cahier-101-11-035.png? | ||
+ | Si // | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Nombre de sauvegardes __// | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Chaque fois qu'une sauvegarde Complète se termine avec succès, la plus ancienne est supprimée. Si ce nombre est diminué, les anciennes sauvegardes en surplus seront supprimées. | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Les anciennes sauvegardes Complètes sont supprimées après // | ||
+ | |||
+ | On garde au moins **1** sauvegarde Complète. | ||
+ | |||
+ | // | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-036.png? | ||
+ | ==== Sauvegardes Incrémentielles ==== | ||
+ | |||
+ | // | ||
+ | Période minimale en jours, entre les sauvegardes Incrémentielles //(une sauvegarde Incrémentielle demandée par l' | ||
+ | |||
+ | Généralement, | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Nombre de sauvegardes Incrémentielles à conserver. Doit être //> = 1//. | ||
+ | |||
+ | Chaque fois qu'une sauvegarde Incrémentielle se termine avec succès et que le compte est > que // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Garder au moins **1** sauvegarde Incrémentielle. | ||
+ | |||
+ | // | ||
+ | Les sauvegardes Incrémentielles très anciennes sont supprimées après // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-037.png? | ||
+ | ==== Suspension ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Désactive toutes les sauvegardes Complètes et Incrémentielles. Ce paramètre est utile pour un client qui n'est plus sauvegardé //(par exemple: une machine qui est retirée)//, | ||
+ | |||
+ | Ce paramètre peut prendre trois valeurs: | ||
+ | |||
+ | - 0 -> Les sauvegardes sont activées. | ||
+ | - 1 -> Ne pas faire de sauvegardes régulières sur ce client. Les sauvegardes demandées manuellement //(via l' | ||
+ | - 2 -> Ne faire aucune sauvegarde sur ce client. Les demandes manuelles des sauvegardes //(via l' | ||
+ | |||
+ | // | ||
+ | Si le serveur ne répond pas après __3__ ping, abandonner. | ||
+ | |||
+ | // | ||
+ | Les PCs qui sont toujours, ou souvent, présents sur le réseau peuvent être sauvegardés après les heures régulières afin de réduire la charge sur le PC, le réseau et le serveur pendant les heures de travail. Pour chaque PC, le nombre de pings consécutifs est maintenu. Une fois qu'un PC a au moins // | ||
+ | |||
+ | Pour permettre le redémarrage périodique d'un PC ou d' | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Pour désactiver la fonction de " | ||
+ | |||
+ | // | ||
+ | Une ou plusieurs périodes d' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-038.png? | ||
+ | ==== Divers ==== | ||
+ | |||
+ | // | ||
+ | Nombre de journaux de restauration à conserver. // | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | // | ||
+ | Nombre de journaux d' | ||
+ | |||
+ | // | ||
+ | Une sauvegarde d'un partage ayant zéro fichier est considérée comme fatale. Ce paramètre est utilisé pour attraper diverses erreurs qui surviennent lorsque //Xfer// ne sauvegarde aucun fichier. //Si vous avez des partages qui peuvent être vides// //(et donc une sauvegarde vide est valide)//, vous devez mettre cet indicateur à 0 // | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-040.png? | ||
+ | ===== Serveur ===== | ||
+ | |||
+ | // | ||
+ | Nombre maximal de fichiers journaux que // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Xfer ===== | ||
+ | |||
+ | <WRAP column 75%> | ||
+ | |{{ Images_Cahier-101-11-042.png? | ||
+ | </ | ||
+ | <WRAP column 15%> | ||
+ | |{{ Images_Cahier-101-11-043.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Pour le niveau de verbosité // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Paramètres ssh ===== | ||
+ | |||
+ | {{ Images_Cahier-101-11-045.png? | ||
+ | ==== Port SSH du Serveur NethServer ==== | ||
+ | |||
+ | Dans l' | ||
+ | |||
+ | Il faut ajuster le port SSH pour les communications de // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Fichier de configuration SSH de BackupPC ==== | ||
+ | |||
+ | Le répertoire pour tout ce qui concerne SSH est: ''/ | ||
+ | |||
+ | Nous créons un fichier pour spécifier les paramètres de configuration SSH de // | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# touch / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste le propriétaire et le groupe du fichier. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chown backuppc: | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste les droits. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chmod 640 / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === Spécification du port SSH === | ||
+ | |||
+ | Il existe plusieurs manières de spécifier ce port, mais la plus efficace est celle ci-dessous. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | Host * | ||
+ | Port 2222 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | Nous aurions pu utiliser les expressions suivantes pour spécifier le nom de l' | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | Host 192.168.1.33, | ||
+ | Port 2222 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | Host 192.168.1.0/ | ||
+ | Port 2222 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On peut spécifier des hôtes utilisant des ports différents. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | Host 192.168.1.33 | ||
+ | Port 2222 | ||
+ | |||
+ | Host 10.10.10.75 | ||
+ | Port 3333 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On spécifie le port à utiliser.\\ | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | # Michel-André: | ||
+ | # Spécification du port SSH à être utilisé par BackupPC | ||
+ | Host * | ||
+ | Port 2222 | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie les droits, le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -ls / | ||
+ | |||
+ | 0 -rw-r----- 1 backuppc apache 120 18 mars 15:17 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le contenu. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat / | ||
+ | |||
+ | # Michel-André: | ||
+ | # Spécification du port SSH à être utilisé par BackupPC | ||
+ | Host * | ||
+ | Port 2222 | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Propriétés DB ===== | ||
+ | |||
+ | Il n' | ||
+ | |||
+ | - // | ||
+ | \\ | ||
+ | \\ | ||
+ | - // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | - // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | - // | ||
+ | |||
+ | Affichage des propriétés du service backuppc. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# db configuration show backuppc | ||
+ | |||
+ | backuppc=service | ||
+ | CgiMultiUser=enabled | ||
+ | examples=enabled | ||
+ | status=enabled | ||
+ | sudo=/ | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | / | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Utilitaire sudo ==== | ||
+ | |||
+ | L' | ||
+ | |||
+ | L' | ||
+ | |||
+ | Dans notre cas particulier, | ||
+ | |||
+ | Par défaut, cette liste comprend les commandes suivantes: | ||
+ | |||
+ | - / | ||
+ | - /bin/gtar | ||
+ | - /bin/tar | ||
+ | |||
+ | === Fichier de configuration de sudo === | ||
+ | |||
+ | L' | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Lancement de l' | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@backuppc ~]# visudo | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | === Erreur en modifiant le fichier / | ||
+ | |||
+ | Si vous avez fait une erreur lors de la modification du fichier, un message d' | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | visudo: >>> | ||
+ | What now? | ||
+ | Options are: | ||
+ | (e)dit sudoers file again | ||
+ | e(x)it without saving changes to sudoers file | ||
+ | (Q)uit and save changes to sudoers file (DANGER!) | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Réveil par le réseau (WOL) ===== | ||
+ | |||
+ | À titre d' | ||
+ | )\\ \\ ))//. | ||
+ | |||
+ | Modifier la propriété //sudo// et ajouter la commande ''/ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | config setprop backuppc sudo `config getprop backuppc sudo`,/ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Signaler le changement... | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | / | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ... puis ajoutez simplement un script, tel que ci-dessous, à votre commande de // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | #!/bin/sh | ||
+ | # Set the mac address for each host | ||
+ | host1_mac=< | ||
+ | host1_name=< | ||
+ | host2_mac=< | ||
+ | host2_name=< | ||
+ | # How long does the host take to boot | ||
+ | boottime=120 | ||
+ | # Which interface to send the WoL packets out of | ||
+ | interface=eth0 | ||
+ | # Function to check if the host pings | ||
+ | pingcheck() | ||
+ | { | ||
+ | ping -w 5 -c 2 $1 | ||
+ | export pingstatus=$? | ||
+ | } | ||
+ | case $1 in | ||
+ | | ||
+ | sudo etherwake -i $interface $host1_mac | ||
+ | sleep $boottime | ||
+ | | ||
+ | exit $pingstatus | ||
+ | ;; | ||
+ | | ||
+ | sudo etherwake -i $interface $host2_mac | ||
+ | sleep $boottime | ||
+ | | ||
+ | exit $pingstatus | ||
+ | ;; | ||
+ | *) | ||
+ | echo " | ||
+ | exit 1 | ||
+ | ;; | ||
+ | esac | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Configuration du gabarit linux-template ====== | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | // | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-046.png? | ||
+ | ===== Paramètres de sauvegarde ===== | ||
+ | |||
+ | **Hôtes → linux-template -> Modifier la configuration -> Paramètres de sauvegarde**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== DumpPreUserCmd ==== | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== DumpPostUserCmd ==== | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-047.png? | ||
+ | ===== Courriel ===== | ||
+ | |||
+ | Ajustez vers quelle adresse courriel vous voulez envoyer les notifications de // | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-048.png? | ||
+ | ===== Horaire ===== | ||
+ | |||
+ | // | ||
+ | Pour plus d' | ||
+ | |||
+ | // | ||
+ | Pour plus d' | ||
+ | |||
+ | // | ||
+ | Voir la section // | ||
+ | |||
+ | // | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== BlackoutPeriods ==== | ||
+ | |||
+ | {{ Images_Cahier-101-11-049.png? | ||
+ | Une ou plusieurs périodes d' | ||
+ | |||
+ | Par défaut, les machines des serveurs Linux ont une période d' | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-050.png? | ||
+ | ===== Xfer ===== | ||
+ | |||
+ | // | ||
+ | //0// signifie être calme, //1// donnera une ligne par fichier, //2// montrera également les fichiers sautés sur les incrémentielles. Des valeurs plus élevées donneront plus de résultats. Une verbosité de __//8//__ servira pour le débogage. | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-052.png? | ||
+ | ==== BackupFilesExclude ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | de la machine hôte de BackupPC ou pour tout autre Serveur NethServer.**</ | ||
+ | \\ | ||
+ | |||
+ | ====== Création d'une machine pour le serveur hôte ====== | ||
+ | |||
+ | Pour le serveur roulant // | ||
+ | |||
+ | ===== Création de la machine du serveur hôte ===== | ||
+ | |||
+ | {{ Images_Cahier-101-11-054.png? | ||
+ | On clique **Modifier les machines** //(le menu devient **Modifier la configuration** et l' | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-056.png? | ||
+ | La nouvelle machine, hôte de // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-057.png? | ||
+ | On rafraîchit la page du navigateur puis, on clique **Renvoyer**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-058.png? | ||
+ | ===== Page d' | ||
+ | |||
+ | Sous // | ||
+ | |||
+ | La page d' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification/ | ||
+ | |||
+ | ==== Paramètres de sauvegarde ==== | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | \\ | ||
+ | **Modifier la configuration**. | ||
+ | |{{ Images_Cahier-101-11-059.png? | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-11-060.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Courriel & Horaire ==== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | // | ||
+ | |{{ Images_Cahier-101-11-061.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | // | ||
+ | |{{ Images_Cahier-101-11-062.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | // | ||
+ | |{{ Images_Cahier-101-11-063.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | |||
+ | === hourBegin & hourEnd === | ||
+ | |||
+ | **Horaire** // | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-11-064.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-11-065.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-11-066.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | // | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | Nous ne voulons pas que le serveur se sauvegarde lui-même pendant qu'il sauvegarde un autre serveur. Vu que les machines des autres serveurs auront une période d' | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-068.png? | ||
+ | ==== Xfer ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | **0** signifie être calme, //1// donnera une ligne par fichier, //2// montrera également les fichiers sautés sur les incrémentielles. Des valeurs plus élevées donneront plus de résultats. Une verbosité de //8// servira pour le débogage. | ||
+ | |||
+ | // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | === BackupFilesExclude === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Lorsqu' | ||
+ | |||
+ | On détruit donc l' | ||
+ | |||
+ | {{ Images_Cahier-101-11-070.png? | ||
+ | ● Vis-a-vis // | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | On remplace l' | ||
+ | |||
+ | {{ Images_Cahier-101-11-071.png? | ||
+ | On clique **Ajouter** et on entre les répertoires: | ||
+ | |||
+ | - / | ||
+ | - / | ||
+ | - / | ||
+ | - / | ||
+ | - / | ||
+ | - / | ||
+ | \\ | ||
+ | \\ | ||
+ | On exclut aussi certains répertoires de configurations: | ||
+ | |||
+ | - / | ||
+ | Sert à la configuration des cartes réseaux qu'on voudra garder sur le serveur de DESTINATION. | ||
+ | - / | ||
+ | Sert pour la configuration de l' | ||
+ | \\ | ||
+ | \\ | ||
+ | On exclut le fichier suivant: | ||
+ | * / | ||
+ | Sert pour le montage des disques qu'on voudra garder sur le serveur de DESTINATION. | ||
+ | |||
+ | {{Images_Cahier-101-11-027.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | \\ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | Tout est prêt pour notre première sauvegarde.**</ | ||
+ | \\ | ||
+ | |||
+ | ====== Sauvegarde du serveur hôte ====== | ||
+ | |||
+ | Nous allons sauvegarder le Serveur NethServer roulant // | ||
+ | |||
+ | ===== Sauvegarde automatique ===== | ||
+ | |||
+ | Si nous avons créé et configuré le serveur hôte de // | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Clé SSH publique de BackupPC ===== | ||
+ | |||
+ | Avant de faire quoi que ce soit, on téléverse la clé SSH de // | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Explication du blocage des futures tentatives de connexion ==== | ||
+ | |||
+ | Sans la clé SSH, téléversée sur le serveur à sauvegarder et qui permet à // | ||
+ | |||
+ | Sans la clé SSH sur le serveur à sauvegarder, | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | Got fatal error during xfer (rsync error: unexplained error (code 255) at io.c(629) [Receiver=3.0.9.12]). | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Téléversement de la clé SSH de BackupPC ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | On se substitue à l' | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@backuppc ~]# su -s /bin/bash backuppc | ||
+ | |||
+ | bash-4.1$ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On téléverse la clé SSH publique de // | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | bash-4.2$ ssh-copy-id -p 2222 -i ~backuppc/ | ||
+ | |||
+ | bash-4.2$ ssh-copy-id -p 2222 -i ~backuppc/ | ||
+ | / | ||
+ | The authenticity of host ' | ||
+ | ECDSA key fingerprint is SHA256: | ||
+ | ECDSA key fingerprint is MD5: | ||
+ | Are you sure you want to continue connecting (yes/no)? yes | ||
+ | / | ||
+ | / | ||
+ | root@127.0.0.1' | ||
+ | |||
+ | Number of key(s) added: 1 | ||
+ | |||
+ | Now try logging into the machine, with: " | ||
+ | and check to make sure that only the key(s) you wanted were added. | ||
+ | |||
+ | bash-4.2$ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | On sort de la substitution d' | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | bash-4.2$ exit | ||
+ | |||
+ | exit | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Vérification du téléchargement de la clé publique ==== | ||
+ | |||
+ | On ouvre une session //PuTTY// vers le Serveur NethServer hôte de // | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | On vérifie la présence de la clé publique de // | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# cat / | ||
+ | |||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCuyZjkFyxAQFxBg734n06mjtIPSNRHuSMB+EfSqWvHZkrzuO/ | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Sauvegarde " | ||
+ | |||
+ | ==== Espace disque et nombre d' | ||
+ | |||
+ | Espace disque avant la sauvegarde | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -h | ||
+ | |||
+ | Sys. de fichiers | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs 1,9G | ||
+ | tmpfs 1,9G 8,8M 1,9G 1% /run | ||
+ | tmpfs 1,9G | ||
+ | / | ||
+ | / | ||
+ | tmpfs 379M | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | Nombre d' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -i | ||
+ | |||
+ | Sys. de fichiers | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs 485058 | ||
+ | tmpfs 485058 | ||
+ | tmpfs 485058 | ||
+ | / | ||
+ | / | ||
+ | tmpfs 485058 | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-073.png? | ||
+ | ==== Lancement de la sauvegarde ==== | ||
+ | |||
+ | On retourne à la page **127.0.0.1 Accueil** et on clique **Démarrer la sauvegarde Complète**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | On confirme en cliquant **Démarrer la sauvegarde complète**. | ||
+ | |{{ Images_Cahier-101-11-074.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | On retourne à la page d' | ||
+ | |{{ Images_Cahier-101-11-075.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | |||
+ | {{ Images_Cahier-101-11-076.png? | ||
+ | Au retour à la page d' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-077.png? | ||
+ | La page du journal nous indique que le répertoire de stockage des sauvegardes pour la machine // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== L' | ||
+ | |||
+ | À la console du Serveur NethServer BackupPC, on peut lancer la commande '' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# top -d 1 | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-11-078.png? | ||
+ | On voit que __backuppc__ utilise peu de mémoire, mais un pourcentage très substantiel du temps CPU. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-079.png? | ||
+ | ==== Fichier journal de la machine ==== | ||
+ | |||
+ | Après quelques minutes et un rafraîchissement de la page du journal, // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-080.png? | ||
+ | ==== Liste d' | ||
+ | |||
+ | Lors d'une sauvegarde, la page d' | ||
+ | <WRAP clear></ | ||
+ | |||
+ | // | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Ci-dessous, il a pris __236 secondes__. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | Xfer PIDs are now | ||
+ | Executing DumpPostUserCmd: | ||
+ | Running BackupPC_refCountUpdate -h 192.168.1.33 on 192.168.1.33 | ||
+ | Xfer PIDs are now 2609 | ||
+ | BackupPC_refCountUpdate: | ||
+ | BackupPC_refCountUpdate: | ||
+ | Xfer PIDs are now | ||
+ | Finished BackupPC_refCountUpdate (running time: 236 sec) | ||
+ | Xfer PIDs are now | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-081.png? | ||
+ | ===== Examen de la sauvegarde ===== | ||
+ | |||
+ | Lorsque la sauvegarde est terminée, la page d' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-082.png? | ||
+ | ==== Journaux de la sauvegarde ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-083.png? | ||
+ | === JournalXfer === | ||
+ | |||
+ | Le <wrap em> | ||
+ | |||
+ | ● Le script pre-sauvegarde.sh a été exécuté. | ||
+ | |||
+ | ● Les exclusions ont été prises en compte. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-084.png? | ||
+ | ● Le script '' | ||
+ | |||
+ | ● La mise à jour // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-085.png? | ||
+ | === Journal Erreurs === | ||
+ | |||
+ | Le journal <wrap em> | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 32%> | ||
+ | === Journal principal de BackupPC === | ||
+ | |||
+ | Le journal principal de // | ||
+ | </ | ||
+ | <WRAP column 18%> | ||
+ | |{{ Images_Cahier-101-11-086.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | Ce journal indique notre sauvegarde Complète du serveur // | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | 2019-03-20 22:31:09 User admin requested backup of 127.0.0.1 (127.0.0.1) | ||
+ | 2019-03-20 22:34:18 Started full backup on 127.0.0.1 (pid=8350, share=/) | ||
+ | 2019-03-20 22:41:13 Finished full backup on 127.0.0.1 | ||
+ | 2019-03-20 23:00:00 Next wakeup is 2019-03-21 01:00:00 | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === Journal " | ||
+ | |||
+ | Les commandes // | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | Mar 20 22:31:10 backuppc esmith:: | ||
+ | ... | ||
+ | Mar 20 22:31:34 backuppc esmith:: | ||
+ | ... | ||
+ | Mar 20 22:40:33 backuppc esmith:: | ||
+ | ... | ||
+ | Mar 20 22:40:49 backuppc esmith:: | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Espace disque et nombre d' | ||
+ | |||
+ | === Espace disque après la première sauvegarde === | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -h | ||
+ | |||
+ | Filesystem | ||
+ | / | ||
+ | 6,8G 3,6G 2,8G 57% / | ||
+ | tmpfs | ||
+ | / | ||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | === Nombre d' | ||
+ | |||
+ | Le nombre d' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -i | ||
+ | |||
+ | Filesystem | ||
+ | / | ||
+ | | ||
+ | tmpfs 490294 | ||
+ | / | ||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-087.png? | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== XferLogLevel ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | 2019-03-03 11:35:44 full backup started for directory / | ||
+ | 2019-03-03 11:39:29 Got fatal error during xfer (rsync error: unexplained error (code 139) at io.c(1556) [generator=3.0.9.11]) | ||
+ | 2019-03-03 11:39:34 Backup aborted (rsync error: unexplained error (code 139) at io.c(1556) [generator=3.0.9.11]) | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-088.png? | ||
+ | ===== Première sauvegarde Incrémentielle ===== | ||
+ | |||
+ | **-> Démarrer une sauvegarde Incrémentielle**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | **Démarrer la sauvegarde Incrémentielle**. | ||
+ | |{{ Images_Cahier-101-11-089.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | On retourne à la page d' | ||
+ | |{{ Images_Cahier-101-11-090.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-11-091.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-11-092.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Les 3 minutes écoulées entre le début __10:33__ et la sauvegarde elle-même __10:36__ ont été utilisées, par // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-093.png? | ||
+ | La sauvegarde Incrémentielle est commencée. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-094.png? | ||
+ | La sauvegarde Incrémentielle est terminée. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-095.png? | ||
+ | Ci contre, on voit que la sauvegarde Incrémentielle a été fusionnée à la dernière sauvegarde Complète. | ||
+ | |||
+ | L' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Espace disque et nombre d' | ||
+ | |||
+ | === Espace disque après la première Incrémentielle === | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -h | ||
+ | |||
+ | Filesystem | ||
+ | / | ||
+ | 6,8G 3,7G 2,8G 57% / | ||
+ | tmpfs | ||
+ | / | ||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | === Nombre d' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# df -i | ||
+ | |||
+ | Filesystem | ||
+ | / | ||
+ | | ||
+ | tmpfs 490294 | ||
+ | / | ||
+ | / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | __Dans BackupPC-4.x, | ||
+ | |||
+ | {{ Images_Cahier-101-11-096.png? | ||
+ | L' | ||
+ | En réalité, // | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{ Images_Cahier-101-11-097.png? | ||
+ | ==== Fusion ==== | ||
+ | |||
+ | Comme l' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-098.png? | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-099.png? | ||
+ | ==== Examen des fichiers ==== | ||
+ | |||
+ | On peut afficher le contenu d'une sauvegarde en cliquant le numéro de celle-ci **->** " | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-100.png? | ||
+ | L' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-101.png? | ||
+ | ===== Deuxième sauvegarde Incrémentielle ===== | ||
+ | |||
+ | On lance une deuxième sauvegarde Incrémentielle. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-102.png? | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | {{Images_Cahier-101-11-103.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Restauration d'un fichier ===== | ||
+ | |||
+ | ==== Restauration vers le répertoire original ==== | ||
+ | |||
+ | {{ Images_Cahier-101-11-104.png? | ||
+ | Si on veut restaurer un fichier particulier, | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-105.png? | ||
+ | On se rend dans le répertoire du fichier en parcourant l' | ||
+ | |||
+ | **-> Restaurer les fichiers sélectionnés**. | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{ Images_Cahier-101-11-106.png? | ||
+ | On vérifie les noms des fichiers à restaurer. | ||
+ | |||
+ | **-> Démarrer la restauration**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-107.png? | ||
+ | On vérifie les chemins de la source et celui de la destination. | ||
+ | |||
+ | **-> Restaurer**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-108.png? | ||
+ | La restauration a réussie, on retourne à la page d' | ||
+ | **-> 127.0.0.1**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-109.png? | ||
+ | On affiche le fichier journal de la machine. | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Voir la capture d' | ||
+ | |||
+ | À comparer avec la capture // | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{ Images_Cahier-101-11-110.png? | ||
+ | À la page d' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | === Vérification === | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | On peut cliquer **Visionner** ou **Erreurs**. | ||
+ | |{{ Images_Cahier-101-11-111.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | **Visionner**. Le journal // | ||
+ | |{{ Images_Cahier-101-11-112.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | |||
+ | {{ Images_Cahier-101-11-113.png? | ||
+ | === Erreur === | ||
+ | |||
+ | Le journal // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-114.png? | ||
+ | ==== Restauration vers un répertoire différent ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | **-> Démarrer la restauration**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-115.png? | ||
+ | **-> Restaurer**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-116.png? | ||
+ | On retourne à la page d' | ||
+ | **-> 127.0.0.1**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-117.png? | ||
+ | // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-118.png? | ||
+ | Vérification dans le //Fichier journal de la machine//. | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | Vérification manuelle. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# ls -als /temp/ | ||
+ | |||
+ | total 8 | ||
+ | 0 drwxr-x--- | ||
+ | 0 dr-xr-xr-x. 18 root | ||
+ | 4 -r-xr-x--- | ||
+ | 4 -r-xr-x--- | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Nettoyage nocturne ===== | ||
+ | |||
+ | ==== Sauvegardes à conserver ==== | ||
+ | |||
+ | === Complètes === | ||
+ | |||
+ | {{ Images_Cahier-101-11-119.png? | ||
+ | Dans la page de configuration, | ||
+ | |||
+ | Nous avons aussi mis // | ||
+ | |||
+ | ● À partir de //V4+//, la suppression des sauvegardes se fait en fonction de fusionnée/ | ||
+ | |||
+ | ● Pour des raisons de compatibilité avec les anciennes versions, ce paramètre continue d' | ||
+ | |||
+ | ● La sauvegarde la plus récente //(qui est toujours fusionnée)// | ||
+ | |||
+ | ●Avec ces paramètres, | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-120.png? | ||
+ | === Incrémentielles === | ||
+ | |||
+ | Nous avons indiqué de conserver un maximum de //<wrap em> | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Journal principal de BackupPC ==== | ||
+ | |||
+ | **Serveur -> Fichier journal**. Nous avons fait //1// Complète, //2// Incrémentielles et //2// restaurations. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | 2019-03-20 22:31:09 User admin requested backup of 127.0.0.1 (127.0.0.1) | ||
+ | 2019-03-20 22:34:18 Started full backup on 127.0.0.1 (pid=8350, share=/) | ||
+ | 2019-03-20 22:41:13 Finished full backup on 127.0.0.1 | ||
+ | 2019-03-20 23:00:00 Next wakeup is 2019-03-21 01:00:00 | ||
+ | ... | ||
+ | 2019-03-21 10:33:24 User admin requested backup of 127.0.0.1 (127.0.0.1) | ||
+ | 2019-03-21 10:36:15 Started incr backup on 127.0.0.1 (pid=6348, share=/) | ||
+ | 2019-03-21 10:37:00 Finished incr backup on 127.0.0.1 | ||
+ | 2019-03-21 11:00:01 Next wakeup is 2019-03-21 12:00:00 | ||
+ | 2019-03-21 11:50:59 User admin requested backup of 127.0.0.1 (127.0.0.1) | ||
+ | 2019-03-21 11:51:41 Started incr backup on 127.0.0.1 (pid=11259, share=/) | ||
+ | 2019-03-21 11:52:17 Finished incr backup on 127.0.0.1 | ||
+ | 2019-03-21 12:00:00 Next wakeup is 2019-03-21 13:00:00 | ||
+ | 2019-03-21 12:23:16 User admin requested restore to 127.0.0.1 (127.0.0.1) | ||
+ | 2019-03-21 12:23:16 Started restore on 127.0.0.1 (pid=5459) | ||
+ | 2019-03-21 12:23:17 Finished restore on 127.0.0.1 | ||
+ | 2019-03-21 12:49:30 User admin requested restore to 127.0.0.1 (127.0.0.1) | ||
+ | 2019-03-21 12:49:31 Started restore on 127.0.0.1 (pid=7145) | ||
+ | 2019-03-21 12:49:31 Finished restore on 127.0.0.1 | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-121.png? | ||
+ | ==== Résumés des sauvegardes/ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Fermeture et amorçage du serveur BackupPC ==== | ||
+ | |||
+ | Nous avons éteint le serveur // | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | |||
+ | 2019-03-20 23:57:48 Got signal TERM... cleaning up (exit code = 0) | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Le lendemain, nous avons amorcer le serveur // | ||
+ | |||
+ | Le prochain réveil de // | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | 2019-03-21 10:03:42 Reading hosts file | ||
+ | 2019-03-21 10:03:42 BackupPC 4.3.0 (Perl v5.16.3) started, pid 3237 | ||
+ | 2019-03-21 10:03:43 Next wakeup is 2019-03-21 11:00:00 | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Journal de la machine 127.0.0.1, hôte de BackupPC ==== | ||
+ | |||
+ | {{ Images_Cahier-101-11-122.png? | ||
+ | Vu que: | ||
+ | |||
+ | ● Nous avons //3// sauvegardes: | ||
+ | |||
+ | ● // | ||
+ | |||
+ | ● La sauvegarde la plus récente __#2__ //(qui est toujours fusionnées)// | ||
+ | |||
+ | ● À partir de //V4+//, la suppression des sauvegardes se fait en fonction de fusionnée/ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Nettoyage des anciennes sauvegardes ==== | ||
+ | |||
+ | Pour démontrer le nettoyage nocturne, nous allons: | ||
+ | |||
+ | 1) Configurer notre serveur hôte de // | ||
+ | |||
+ | 2) Réamorcer le serveur hôte. | ||
+ | |||
+ | 3) Demander une nouvelle sauvegarde incrémentielle. | ||
+ | |||
+ | 4) Vérifier le résultat. | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-124.png? | ||
+ | === Modification de la configuration de 127.0.0.1 === | ||
+ | |||
+ | // | ||
+ | |||
+ | **-> Sauvegarder**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | === Réamorçage du serveur hôte === | ||
+ | |||
+ | À la console su serveur. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# reboot | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | Après le réamorçage, | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | 2019-03-21 14:47:36 admin a chang� FullKeepCnt dans host 127.0.0.1 config de [7] � [1] | ||
+ | 2019-03-21 14:48:18 Got signal TERM... cleaning up (exit code = 0) | ||
+ | 2019-03-21 14:48:52 Reading hosts file | ||
+ | 2019-03-21 14:48:52 BackupPC 4.3.0 (Perl v5.16.3) started, pid 3201 | ||
+ | 2019-03-21 14:48:52 Next wakeup is 2019-03-21 15:00:00 | ||
+ | </ | ||
+ | </ | ||
+ | BackupPC n'a encore rien nettoyé. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-125.png? | ||
+ | === Nouvelle sauvegarde incrémentielle === | ||
+ | |||
+ | **-> Démarrer la sauvegarde incrémentielle**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | === Vérification === | ||
+ | |||
+ | {{ Images_Cahier-101-11-126.png? | ||
+ | Après la sauvegarde incrémentielle, | ||
+ | |||
+ | **Serveur -> Fichier journal**. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | 2019-03-21 14:56:14 User admin requested backup of 127.0.0.1 (127.0.0.1) | ||
+ | 2019-03-21 14:59:30 Started incr backup on 127.0.0.1 (pid=4941, share=/) | ||
+ | 2019-03-21 15:00:00 Next wakeup is 2019-03-21 16:00:00 | ||
+ | 2019-03-21 15:00:20 Finished incr backup on 127.0.0.1 | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-127.png? | ||
+ | On examine le journal de la machine de l' | ||
+ | |||
+ | // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | On voit qu' | ||
+ | <WRAP column 65%> | ||
+ | * Il a examiné le paramètre // | ||
+ | * Il a calculé le nombre de sauvegardes fusionnées: | ||
+ | * Il en a déduit qu'il existait une sauvegarde fusionnée qui était de trop. | ||
+ | * Il a supprimé la plus ancienne, <wrap em># | ||
+ | * Puis, il a débuté l' | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | {{Images_Cahier-101-11-128.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{ Images_Cahier-101-11-129.png? | ||
+ | === Résulta final === | ||
+ | |||
+ | La sauvegarde <wrap em># | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 32%> | ||
+ | // | ||
+ | |||
+ | On remet en place notre configuration originale. | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-11-130.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-11-131.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Activation des sauvegardes ===== | ||
+ | |||
+ | {{ Images_Cahier-101-11-132.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | // | ||
+ | |||
+ | Dans la section Suspension: **// | ||
+ | |||
+ | **-> Sauvegarder**. | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ====== Sauvegarde du serveur SOURCE ====== | ||
+ | |||
+ | ===== Diagramme réseau ===== | ||
+ | |||
+ | {{ Images_Cahier-101-11-133.png? | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-134.png? | ||
+ | ===== Page Web ===== | ||
+ | |||
+ | On affiche la page Web du serveur SOURCE: https:// | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Création de la machine SOURCE dans BackupPC ===== | ||
+ | |||
+ | Nous allons créer une nouvelle machine dans // | ||
+ | |||
+ | ● Nom du serveur: // | ||
+ | ● Adresse IP: // | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | Nous utilisons le gabarit __linux-template__ pour créer la nouvelle machine dans // | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-11-135.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | **Vérification**. | ||
+ | |{{ Images_Cahier-101-11-136.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-137.png? | ||
+ | On rafraîchit la page du fureteur **-> Renvoyer**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-138.png? | ||
+ | ==== Page d' | ||
+ | |||
+ | Sous // | ||
+ | |||
+ | La page d' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification de la configuration ===== | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | \\ | ||
+ | **Modifier la configuration**. | ||
+ | |{{ Images_Cahier-101-11-139.png? | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-11-140.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Horaire**. | ||
+ | |{{ Images_Cahier-101-11-141.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | |{{ Images_Cahier-101-11-142.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | |{{ Images_Cahier-101-11-143.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | <WRAP column 60%> | ||
+ | **Horaire** // | ||
+ | |{{ Images_Cahier-101-11-144.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | |{{ Images_Cahier-101-11-145.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | === Xfer / BackupFilesExclude === | ||
+ | |||
+ | {{ Images_Cahier-101-11-146.png? | ||
+ | **Ajouter**: | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | **-> Sauvegarder**. | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Tout est prêt pour la première sauvegarde Complète du Serveur NethServer SOURCE. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Téléversement de la clé SSH de BackupPC vers SOURCE ===== | ||
+ | |||
+ | __Sur le serveur hôte de // | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# su -s /bin/bash backuppc | ||
+ | |||
+ | bash-4.1$ | ||
+ | </ | ||
+ | |||
+ | On téléverse la clé publique de // | ||
+ | |||
+ | < | ||
+ | bash-4.1$ ssh-copy-id -p 2222 -i ~backuppc/ | ||
+ | |||
+ | / | ||
+ | The authenticity of host ' | ||
+ | ECDSA key fingerprint is SHA256: | ||
+ | ECDSA key fingerprint is MD5: | ||
+ | Are you sure you want to continue connecting (yes/no)? yes | ||
+ | / | ||
+ | / | ||
+ | root@10.10.10.75' | ||
+ | |||
+ | Number of key(s) added: 1 | ||
+ | |||
+ | Now try logging into the machine, with: " | ||
+ | and check to make sure that only the key(s) you wanted were added. | ||
+ | |||
+ | bash-4.1$ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Vérification ==== | ||
+ | |||
+ | On vérifie le login sans mot de passe et la clé SSH de // | ||
+ | |||
+ | < | ||
+ | bash-4.1$ | ||
+ | |||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCuyZjkFyxAQFxBg734n06mjtIPSNRHuSMB+EfSqWvHZkrzuO/ | ||
+ | bash-4.1$ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | Sur le serveur hôte, on vérifie la concordance des clés en affichant la clé publique de // | ||
+ | |||
+ | < | ||
+ | bash-4.1$ cat / | ||
+ | |||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCuyZjkFyxAQFxBg734n06mjtIPSNRHuSMB+EfSqWvHZkrzuO/ | ||
+ | bash-4.1$ | ||
+ | </ | ||
+ | |||
+ | __Les clés coïncident__. La clé a bien été téléversée sur le serveur SOURCE. | ||
+ | |||
+ | On vérifie encore une fois que __root__ //(sous backuppc)// peut se loguer sur le serveur distant, sans mot de passe. | ||
+ | |||
+ | < | ||
+ | bash-4.1$ ssh -p 2222 root@10.10.10.75 | ||
+ | |||
+ | Last login: Fri Mar 22 09:29:18 2019 | ||
+ | |||
+ | ************ Welcome to NethServer ************ | ||
+ | |||
+ | This is a NethServer installation. | ||
+ | |||
+ | Before editing configuration files, be aware | ||
+ | of the automatic events and templates system. | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | *********************************************** | ||
+ | [root@tchana ~]# | ||
+ | |||
+ | </ | ||
+ | |||
+ | La connexion sans mot de passe a réussie. On se désengage de la connexion et on revient au serveur hôte de // | ||
+ | |||
+ | < | ||
+ | [root@ tchana ~]# exit | ||
+ | |||
+ | logout | ||
+ | Connection to 10.10.10.75 closed. | ||
+ | bash-4.1$ | ||
+ | </ | ||
+ | |||
+ | On sort de la substitution et on revient à l' | ||
+ | < | ||
+ | bash-4.1$ exit | ||
+ | |||
+ | exit | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-147.png? | ||
+ | ===== Sauvegarde du Serveur NethServer SOURCE ===== | ||
+ | |||
+ | On lance la sauvegarde Complète du serveur SOURCE // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-148.png? | ||
+ | La sauvegarde débute. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-149.png? | ||
+ | La sauvegarde est en cours. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-150.png? | ||
+ | Le **Fichier journal** de la machine SOURCE affiche les résultats de la sauvegarde Complète. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-151.png? | ||
+ | La page d' | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Les //Fichiers existants// sont ceux trouvés dans la sauvegarde d'un autre Serveur NethServer, celle de // | ||
+ | |||
+ | C'est ce qui explique que <wrap em>13 419</ | ||
+ | |||
+ | Seulement <wrap em>16 928</ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Incrémentielles du Serveur NethServer SOURCE ===== | ||
+ | |||
+ | ==== Première Incrémentielle ==== | ||
+ | |||
+ | {{ Images_Cahier-101-11-152.png? | ||
+ | On lance la sauvegarde Incrémentielle de la même manière que celle du serveur hôte de // | ||
+ | |||
+ | L' | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 32%> | ||
+ | L' | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-11-153.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{ Images_Cahier-101-11-154.png? | ||
+ | Sur la page d' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 32%> | ||
+ | ==== Deuxième Incrémentielle ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Les deux Incrémentielles sont toutes deux fusionnées. | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-11-155.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-156.png? | ||
+ | Sur la page d' | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | du serveur SOURCE vers le serveur DESTINATION.**</ | ||
+ | \\ | ||
+ | |||
+ | ====== Restauration de Source sur Destination ====== | ||
+ | |||
+ | ===== Diagramme réseau ===== | ||
+ | |||
+ | Serveur DESTINATION sur réseau LOCAL, notre cas pour ce cahier. | ||
+ | |||
+ | {{ Images_Cahier-101-11-157.png? | ||
+ | \\ | ||
+ | |||
+ | Serveur DESTINATION sur réseau distant. | ||
+ | |||
+ | {{ Images_Cahier-101-11-158.png? | ||
+ | \\ | ||
+ | |||
+ | Advenant le cas où le Serveur NethServer est distant et que l' | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-159.png? | ||
+ | ===== Dernière sauvegarde de SOURCE ===== | ||
+ | |||
+ | La dernière sauvegarde porte le <wrap em># | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | <WRAP column 32%> | ||
+ | Cette sauvegarde n'a pas sauvegardé les répertoires: | ||
+ | ● / | ||
+ | ● / | ||
+ | et le fichier\\ | ||
+ | ● /etc/fstab. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | {{Images_Cahier-101-11-160.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | Le répertoire ''/ | ||
+ | |||
+ | Le répertoire ''/ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Création du fichier TAR de la sauvegarde ===== | ||
+ | |||
+ | ==== Connexion au serveur BackupPC ==== | ||
+ | |||
+ | Si nous n' | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | login as: root | ||
+ | |||
+ | root@10.10.10.33' | ||
+ | Last login: Thu Mar 21 14:48:13 2019 | ||
+ | |||
+ | ************ Welcome to NethServer ************ | ||
+ | |||
+ | This is a NethServer installation. | ||
+ | |||
+ | Before editing configuration files, be aware | ||
+ | of the automatic events and templates system. | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | *********************************************** | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Répertoire de stockage des fichiers TAR ==== | ||
+ | |||
+ | Sur le serveur // | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# mkdir / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chown backuppc: | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste les droits. | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# chmod 700 / | ||
+ | |||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | < | ||
+ | |||
+ | root@backuppc ~]# ls -lsd / | ||
+ | |||
+ | 1 drwx------ 2 backuppc apache 1024 22 mars 16:23 / | ||
+ | [root@backuppc ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Création du fichier TAR ==== | ||
+ | |||
+ | === BackupPC_tarCreate === | ||
+ | |||
+ | L' | ||
+ | |||
+ | Les fichiers et répertoires de la ligne de commande sont relatifs au nom du partage spécifié. | ||
+ | |||
+ | Les options <wrap em> | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | BackupPC_tarCreate [options] fichiers/ | ||
+ | |||
+ | Options obligatoires: | ||
+ | -h host hôte à partir duquel l' | ||
+ | -n dumpNum | ||
+ | Un nombre négatif signifie par rapport à la fin (par exemple, -1 | ||
+ | | ||
+ | -s shareName | ||
+ | |||
+ | Other options: | ||
+ | | ||
+ | -r pathRemove | ||
+ | -p pathAdd | ||
+ | -b BLOCKS | ||
+ | -w writeBufSz | ||
+ | -e charset | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# su - backuppc -s /bin/sh | ||
+ | |||
+ | -sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | -sh-4.1$ whoami | ||
+ | |||
+ | backuppc | ||
+ | -sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | On se rend dans le répertoire de stockage. | ||
+ | |||
+ | < | ||
+ | -sh-4.1$ cd / | ||
+ | |||
+ | -sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | -sh-4.1$ pwd | ||
+ | |||
+ | / | ||
+ | -sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | On crée le fichier TAR de la sauvegarde numéro <wrap em> | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | -sh-4.1$ | ||
+ | |||
+ | -sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | -sh-4.1$ ls -ls | ||
+ | |||
+ | 4366862 -rw-rw-r-- 1 backuppc backuppc 4471664640 22 mars 16:34 source-75-2.tar | ||
+ | -sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-161.png? | ||
+ | ===== Préparation du serveur DESTINATION ===== | ||
+ | |||
+ | On ouvre une session PuTTY vers le serveur DESTINATION. | ||
+ | |||
+ | On entre les informations demandées, on sauvegarde cette configuration et on ouvre la session. On accepte la clé SSH et on se logue au serveur DESTINATION. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | < | ||
+ | login as: root | ||
+ | |||
+ | root@10.10.10.66' | ||
+ | Last login: Fri Mar 22 16:58:12 2019 from 10.10.10.81 | ||
+ | |||
+ | ************ Welcome to NethServer ************ | ||
+ | |||
+ | This is a NethServer installation. | ||
+ | |||
+ | Before editing configuration files, be aware | ||
+ | of the automatic events and templates system. | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | *********************************************** | ||
+ | [root@destination ~]# | ||
+ | </ | ||
+ | |||
+ | Nous sommes dans le répertoire personnel de root sur DESTINATION. | ||
+ | |||
+ | < | ||
+ | [root@destination ~]# pwd | ||
+ | |||
+ | /root | ||
+ | [root@destination ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Vérification du répertoire / | ||
+ | |||
+ | On vérifie que le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@destination ~]# ls -als / | ||
+ | |||
+ | total 4 | ||
+ | 0 drwxr-xr-x. 3 root root 43 Mar 22 15:02 . | ||
+ | 0 drwxr-xr-x. 4 root root 33 Jan 18 20:25 .. | ||
+ | 4 -rw-r--r-- | ||
+ | 0 drwxr-xr-x. 3 root root 28 Jan 18 20:26 .well-known | ||
+ | [root@destination ~]# | ||
+ | </ | ||
+ | |||
+ | Le répertoire '' | ||
+ | |||
+ | Le fichier '' | ||
+ | |||
+ | Il faut supprimer ce fichier car il entrerait en conflit avec '' | ||
+ | |||
+ | < | ||
+ | [root@destination ~]# rm / | ||
+ | |||
+ | rm: remove regular file ‘/ | ||
+ | [root@destination ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Mise à jour de DESTINATION ==== | ||
+ | |||
+ | __Avant la restauration__, | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | < | ||
+ | [root@destination ~]# yum install -y jq | ||
+ | |||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total download size: 282 k | ||
+ | Installed size: 906 k | ||
+ | ... | ||
+ | Install | ||
+ | |||
+ | Total download size: 282 k | ||
+ | Installed size: 906 k | ||
+ | Downloading packages: | ||
+ | ... | ||
+ | Installed: | ||
+ | jq.x86_64 0:1.5-1.el7 | ||
+ | |||
+ | Dependency Installed: | ||
+ | oniguruma.x86_64 0: | ||
+ | |||
+ | Complete! | ||
+ | [root@destination ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | < | ||
+ | [root@destination ~]# yum -y --enablerepo=nethserver-updates clean metadata | ||
+ | |||
+ | Loaded plugins: changelog, fastestmirror, | ||
+ | Cleaning repos: base centos-sclo-rh centos-sclo-sclo epel extras nethforge nethserver-base | ||
+ | : nethserver-updates updates | ||
+ | 41 metadata files removed | ||
+ | 24 sqlite files removed | ||
+ | 0 metadata files removed | ||
+ | [root@destination ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | On se connecte à l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Administration -> Software center ->** onglet **Updates -> DOWNLOAD AND INSTALL**. | ||
+ | |{{ Images_Cahier-101-11-162.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Reload page**. | ||
+ | |{{ Images_Cahier-101-11-163.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | Toutes les mises à jour ont été installées. | ||
+ | |{{ Images_Cahier-101-11-164.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ===== Arrêt du serveur SOURCE ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Restauration ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On se substitue à l' | ||
+ | |||
+ | < | ||
+ | [root@backuppc ~]# su - backuppc -s /bin/sh | ||
+ | |||
+ | sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | sh-4.1$ whoami | ||
+ | |||
+ | backuppc | ||
+ | sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | On se rend dans le répertoire de stockage des restaurations. | ||
+ | |||
+ | < | ||
+ | sh-4.1$ cd / | ||
+ | |||
+ | sh-4.1$ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | sh-4.1$ pwd | ||
+ | |||
+ | / | ||
+ | sh-4.1$ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Clé SSH ==== | ||
+ | |||
+ | Qui suis-je? | ||
+ | |||
+ | < | ||
+ | sh-4.2$ whoami | ||
+ | |||
+ | backuppc | ||
+ | sh-4.2$ | ||
+ | </ | ||
+ | |||
+ | Où suis-je? | ||
+ | |||
+ | < | ||
+ | sh-4.2$ pwd | ||
+ | |||
+ | / | ||
+ | sh-4.2$ | ||
+ | </ | ||
+ | |||
+ | On téléverse la clé publique de // | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | < | ||
+ | sh-4.1$ ssh-copy-id -p 2222 -i ~backuppc/ | ||
+ | |||
+ | / | ||
+ | The authenticity of host ' | ||
+ | ECDSA key fingerprint is SHA256: | ||
+ | ECDSA key fingerprint is MD5: | ||
+ | Are you sure you want to continue connecting (yes/no)? yes | ||
+ | / | ||
+ | / | ||
+ | root@10.10.10.66' | ||
+ | |||
+ | Number of key(s) added: 1 | ||
+ | |||
+ | Now try logging into the machine, with: " | ||
+ | and check to make sure that only the key(s) you wanted were added. | ||
+ | |||
+ | -sh-4.2$ | ||
+ | </ | ||
+ | |||
+ | Vérification de la connexion sans mot de passe. | ||
+ | |||
+ | < | ||
+ | -sh-4.1$ / | ||
+ | |||
+ | Last login: Fri Mar 22 16:43:18 2019 from 10.10.10.33 | ||
+ | |||
+ | ************ Welcome to NethServer ************ | ||
+ | |||
+ | This is a NethServer installation. | ||
+ | |||
+ | Before editing configuration files, be aware | ||
+ | of the automatic events and templates system. | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | *********************************************** | ||
+ | [root@destination ~]# | ||
+ | </ | ||
+ | |||
+ | La connexion sans mot de passe fonctionne correctement. | ||
+ | |||
+ | On termine la connexion sans mot de passe et on retourne au serveur hôte de // | ||
+ | |||
+ | < | ||
+ | [root@destination ~]# exit | ||
+ | |||
+ | logout | ||
+ | Connection to 10.10.10.66 closed. | ||
+ | -sh-4.2$ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Commande de restauration ==== | ||
+ | |||
+ | On envoie à DESTINATION la commande de changer de répertoire et d' | ||
+ | |||
+ | < | ||
+ | sh-4.2$ | ||
+ | |||
+ | ... | ||
+ | ./ | ||
+ | /bin/tar: Arrêt avec code d' | ||
+ | -sh-4.2$ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Commande restore-config ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On restaure la configuration originale de SOURCE sur DESTINATION. | ||
+ | |||
+ | < | ||
+ | [root@destination ~]# / | ||
+ | |||
+ | Restore config started | ||
+ | Event pre-restore-config: | ||
+ | Action restore-config-execute: | ||
+ | Too few arguments. | ||
+ | |||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-165.png? | ||
+ | Attendre l' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On ferme cet écran: | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | On ferme l' | ||
+ | \\ | ||
+ | |||
+ | ==== Réamorçage ==== | ||
+ | |||
+ | On ouvre une session PuTTY pour se connecter à la nouvelle adresse IP de DESTINATION: | ||
+ | |||
+ | < | ||
+ | login as: root | ||
+ | |||
+ | root@10.10.10.75' | ||
+ | ... | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | __Depuis cette nouvelle connexion__, | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# reboot | ||
+ | |||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-11-166.png? | ||
+ | Après le lancement de la commande, l' | ||
+ | |||
+ | Le réamorçage du serveur DESTINATION peut prendre un certain temps car il lui faut réinitialiser plusieurs paramètres.\\ | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Post restauration ===== | ||
+ | |||
+ | ==== Ajustement du démon NTP ==== | ||
+ | |||
+ | DESTINATION a maintenant la configuration de SOURCE de même que tous ses paquetages. Il faut déclencher '' | ||
+ | |||
+ | On ouvre une nouvelle session PuTTY pour se connecter à DESTINATION: | ||
+ | |||
+ | < | ||
+ | login as: root | ||
+ | |||
+ | root@10.10.10.75' | ||
+ | ... | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On signale au démon NTP de redémarrer tous ses services. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie que la commande a bien été exécutée. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | Mar 24 20:04:59 tchana esmith:: | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Redémarrage de tous les services ==== | ||
+ | |||
+ | Pour développer tous les modèles et redémarrer les services pertinents sans redémarrage, | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== ClamAV ==== | ||
+ | |||
+ | On examine le journal '' | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | tchana clamd: LibClamAV Warning: ************************************************** | ||
+ | tchana clamd: LibClamAV Warning: *** The virus database is older than 7 days! *** | ||
+ | tchana clamd: LibClamAV Warning: *** | ||
+ | tchana clamd: LibClamAV Warning: ************************************************** | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Mise à jour de la BD de ClamAV. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# freshclam | ||
+ | |||
+ | ClamAV update process started at Mon Apr 1 17:13:02 2019 | ||
+ | WARNING: Your ClamAV installation is OUTDATED! | ||
+ | WARNING: Local version: 0.101.1 Recommended version: 0.101.2 | ||
+ | DON'T PANIC! Read https:// | ||
+ | main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr) | ||
+ | Downloading daily-25388.cdiff [100%] | ||
+ | ... | ||
+ | Downloading daily-25406.cdiff [100%] | ||
+ | daily.cld updated (version: 25406, sigs: 1538928, f-level: 63, builder: raynman) | ||
+ | bytecode.cvd is up to date (version: 328, sigs: 94, f-level: 63, builder: neo) | ||
+ | Database updated (6105271 signatures) from database.clamav.net (IP: 104.16.219.84) | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Mise à jour de DESTINATION ==== | ||
+ | |||
+ | Il s'est écoulé un certain temps depuis la sauvegarde de SOURCE et maintenant son clone DESTINATION a peut-être besoin d'une mise à jour. | ||
+ | |||
+ | On vérifie que le RPM '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep jq | ||
+ | |||
+ | jq-1.5-1.el7.x86_64 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On nettoie les référentiels. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum -y --enablerepo=nethserver-updates clean metadata | ||
+ | |||
+ | Loaded plugins: changelog, fastestmirror, | ||
+ | Cleaning repos: base centos-sclo-rh centos-sclo-sclo epel extras nethforge nethserver-base | ||
+ | : nethserver-updates updates | ||
+ | 40 metadata files removed | ||
+ | 22 sqlite files removed | ||
+ | 0 metadata files removed | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On se connecte à l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Administration -> Gestionnaire de logiciels ->** onglet **Mises à jour -> TÉLÉCHARGER ET INSTALLER**. | ||
+ | |{{ Images_Cahier-101-11-167.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Recharger la page**. | ||
+ | |{{ Images_Cahier-101-11-168.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | Toutes les mises à jour ont été installées. | ||
+ | |{{ Images_Cahier-101-11-169.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-101-11-170.png? | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | On nettoie les référentiels. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum -y --enablerepo=nethserver-updates clean metadata | ||
+ | |||
+ | Loaded plugins: changelog, fastestmirror, | ||
+ | Cleaning repos: base centos-sclo-rh centos-sclo-sclo epel extras nethforge nethserver-base | ||
+ | : nethserver-updates updates | ||
+ | 40 metadata files removed | ||
+ | 22 sqlite files removed | ||
+ | 0 metadata files removed | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On lance la commande de mise à jour. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum update -y | ||
+ | |||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | Mettre à jour 35 Paquets | ||
+ | |||
+ | Taille totale | ||
+ | ... | ||
+ | Mise à jour : libuuid-2.23.2-59.el7_6.1.x86_64 | ||
+ | ... | ||
+ | Vérification : tuned-2.10.0-6.el7.noarch | ||
+ | ... | ||
+ | Installé : | ||
+ | kernel.x86_64 0: | ||
+ | |||
+ | Mis à jour : | ||
+ | NetworkManager.x86_64 1: | ||
+ | ... | ||
+ | xfsprogs.x86_64 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Vérification du site Web de DESTINATION ==== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | Diagramme du serveur. | ||
+ | |{{ Images_Cahier-101-11-171.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | On se rend sur le site Web du serveur DESTINATION\\ https:// | ||
+ | |{{ Images_Cahier-101-11-172.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | {{NS-101_002_Banniere_Victoire.png? | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Crédits ====== | ||
+ | |||
+ | © 2018-2019 RF-232\\ | ||
+ | Auteur: Michel-André CLP.\\ | ||
+ | Remerciement: | ||
+ | Intégré par: Michel-André Robillard CLP.\\ | ||
+ | Contact: michelandre at micronator.org | ||
+ | |||
+ | Répertoire de ce document: < | ||
+ | |||
+ | Historique des modifications: | ||
+ | |||
+ | ^Version^Date^Commentaire^Auteur| | ||
+ | |0.0.1|2018-03-05|Début.|Michel-André| | ||
+ | |0.0.2|2018-05-14|- Désactivation des sauvegardes pour tous les gabarits des machines, en changeant pour BackupsDisable=1 sous l' | ||
+ | |0.0.3|2018-08-07|Coquilles dans " | ||
+ | |0.1.0|2018-09-18|Révision complète.|Michel-André| | ||
+ | |0.2.0|2019-03-16|Adaptation pour NethServer-7.6.1810.|Michel-André| | ||
+ | |0.2.1|2019-04-23|Corrections mineures.|Michel-André| | ||
+ | |0.3.0|2019-08-01|Ajustements pour DokuWiki.|Michel-André| | ||
+ | |12345678901| | |12345678901| | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | ===== AVIS DE NON-RESPONSABILITÉ ===== | ||
+ | |||
+ | Ce document est uniquement destiné à informer. Les informations, | ||
+ | |||
+ | RF‑232 ne peut être tenu pour responsable de dommages de quelque nature que ce soit, y compris des dommages directs ou indirects, ainsi que des dommages consécutifs résultant de l' | ||
+ | |||
+ | Chaque internaute doit prendre toutes les mesures appropriées //(mettre à jour régulièrement son logiciel antivirus, ne pas ouvrir des documents suspects de source douteuse ou non connue)// de façon à protéger le contenu de son ordinateur de la contamination d' | ||
+ | |||
+ | Toute reproduction interdite | ||
+ | Vous reconnaissez et acceptez que tout le contenu de ce document, incluant mais sans s’y limiter, le texte et les images, sont protégés par le droit d’auteur, les marques de commerce, les marques de service, les brevets, les secrets industriels et les autres droits de propriété intellectuelle. Sauf autorisation expresse de RF-232, vous acceptez de ne pas vendre, délivrer une licence, louer, modifier, distribuer, copier, reproduire, transmettre, | ||
+ | |||
+ | ==== Avertissement==== | ||
+ | |||
+ | Bien que nous utilisions ici un vocabulaire issu des techniques informatiques, | ||
+ | \\ | ||
+ | \\ |