Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| elearning:workbooks:centos:8:junior:l111 [2021/06/02 15:34] – created admin | elearning:workbooks:centos:8:junior:l111 [2024/09/12 09:17] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ~~PDF: | ~~PDF: | ||
| + | |||
| + | Version : **2024.01** | ||
| Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
| - | ======LCF206 | + | ======LCF506 |
| =====Contenu du Module===== | =====Contenu du Module===== | ||
| - | * **LCF206 | + | * **LCF506 |
| * Contenu du Module | * Contenu du Module | ||
| * Types de Sauvegardes | * Types de Sauvegardes | ||
| Ligne 32: | Ligne 34: | ||
| * Outils de Sauvegarde Multidirectionnelle | * Outils de Sauvegarde Multidirectionnelle | ||
| * Outils de Sauvegarde des Partitions | * Outils de Sauvegarde des Partitions | ||
| + | * LAB #4 - Que Sauvegarder en Priorité ? | ||
| + | * Sauvegarde de la Liste des Paquets | ||
| + | * Sauvegarde d'un Mémo sur la Structure du Disque Dur Système | ||
| + | * Sauvegarde d'un Mémo sur les Points de Montage du Disque Dur Système | ||
| + | * Sauvegarde du Chargeur de Démarrage | ||
| + | * GRUB Legacy | ||
| + | * GRUB 2 avec BIOS | ||
| + | * GRUB 2 avec EFI | ||
| + | * Sauvegarde des Dossiers Utilisateurs | ||
| + | * La Commande Rsync | ||
| + | * Présentation | ||
| + | * LAB #5 - Travailler avec la Commande rsync | ||
| * Compression | * Compression | ||
| * La Commande gzip | * La Commande gzip | ||
| * Présentation | * Présentation | ||
| - | * LAB #4 - Travaller avec la Commande gzip | + | * LAB #6 - Travaller avec la Commande gzip |
| * La Commande bzip2 | * La Commande bzip2 | ||
| * Présentation | * Présentation | ||
| - | * LAB #5 - Travailler avec la Commande bzip2 | + | * LAB #7 - Travailler avec la Commande bzip2 |
| * La Commande xz | * La Commande xz | ||
| * Présentation | * Présentation | ||
| - | * LAB #6 - Travailler avec la Commande xz | + | * LAB #8 - Travailler avec la Commande xz |
| * Autres Utilitaires | * Autres Utilitaires | ||
| Ligne 135: | Ligne 149: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| /test: | /test: | ||
| total 0 | total 0 | ||
| - | drwxr-xr-x. 2 root root 33 Oct 27 11:24 repY | + | drwxr-xr-x. 2 root root 36 Jun 2 14:05 repY |
| - | drwxr-xr-x. 2 root root 24 Oct 27 11:25 repZ | + | drwxr-xr-x. 2 root root 26 Jun 2 14:05 repZ |
| /test/repY: | /test/repY: | ||
| total 0 | total 0 | ||
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y1 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y2 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y3 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y3 |
| /test/repZ: | /test/repZ: | ||
| total 0 | total 0 | ||
| - | -rw-r--r--. 1 root root 0 Oct 27 11:25 Z1 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Z1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:25 Z2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Z2 |
| </ | </ | ||
| Ligne 173: | Ligne 187: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| Usage: tar [OPTION...] [FILE]... | Usage: tar [OPTION...] [FILE]... | ||
| - | GNU `tar' saves many files together into a single tape or disk archive, and can | + | GNU 'tar' saves many files together into a single tape or disk archive, and can |
| restore individual files from the archive. | restore individual files from the archive. | ||
| Ligne 182: | Ligne 196: | ||
| tar -tvf archive.tar | tar -tvf archive.tar | ||
| tar -xf archive.tar | tar -xf archive.tar | ||
| + | |||
| + | Local file name selection: | ||
| + | |||
| + | --add-file=FILE | ||
| + | | ||
| + | -C, --directory=DIR | ||
| + | --exclude=PATTERN | ||
| + | --exclude-backups | ||
| + | --exclude-caches | ||
| + | | ||
| + | --exclude-caches-all | ||
| + | --exclude-caches-under exclude everything under directories containing | ||
| + | | ||
| + | --exclude-ignore=FILE | ||
| + | FILE, if it exists | ||
| + | --exclude-ignore-recursive=FILE | ||
| + | read exclude patterns for each directory and its | ||
| + | | ||
| + | --exclude-tag=FILE | ||
| + | | ||
| + | --exclude-tag-all=FILE exclude directories containing FILE | ||
| + | --exclude-tag-under=FILE | ||
| + | | ||
| + | --exclude-vcs | ||
| + | --exclude-vcs-ignores | ||
| + | --no-null | ||
| + | --no-recursion | ||
| + | --no-unquote | ||
| + | --no-verbatim-files-from | ||
| + | | ||
| + | --null | ||
| + | | ||
| + | --recursion | ||
| + | -T, --files-from=FILE | ||
| + | --unquote | ||
| + | --verbatim-files-from | ||
| + | | ||
| + | -X, --exclude-from=FILE | ||
| + | |||
| + | File name matching options (affect both exclude and include patterns): | ||
| + | |||
| + | --anchored | ||
| + | --ignore-case | ||
| + | --no-anchored | ||
| + | | ||
| + | --no-ignore-case | ||
| + | --no-wildcards | ||
| + | --no-wildcards-match-slash | ||
| + | --wildcards | ||
| + | --wildcards-match-slash | ||
| Main operation mode: | Main operation mode: | ||
| Ligne 201: | Ligne 265: | ||
| -g, --listed-incremental=FILE | -g, --listed-incremental=FILE | ||
| -G, --incremental | -G, --incremental | ||
| + | --hole-detection=TYPE | ||
| --ignore-failed-read | --ignore-failed-read | ||
| --level=NUMBER | --level=NUMBER | ||
| Ligne 222: | Ligne 287: | ||
| -k, --keep-old-files | -k, --keep-old-files | ||
| treat them as errors | treat them as errors | ||
| + | --keep-directory-symlink | ||
| + | | ||
| --keep-newer-files | --keep-newer-files | ||
| their archive copies | their archive copies | ||
| --no-overwrite-dir | --no-overwrite-dir | ||
| + | --one-top-level[=DIR] | ||
| + | | ||
| --overwrite | --overwrite | ||
| --overwrite-dir | --overwrite-dir | ||
| Ligne 249: | Ligne 318: | ||
| | | ||
| times in the first place (METHOD=' | times in the first place (METHOD=' | ||
| + | --clamp-mtime | ||
| + | what was given with --mtime | ||
| --delay-directory-restore | --delay-directory-restore | ||
| | | ||
| of extraction | of extraction | ||
| --group=NAME | --group=NAME | ||
| + | --group-map=FILE | ||
| --mode=CHANGES | --mode=CHANGES | ||
| --mtime=DATE-OR-FILE | --mtime=DATE-OR-FILE | ||
| Ligne 265: | Ligne 337: | ||
| --numeric-owner | --numeric-owner | ||
| --owner=NAME | --owner=NAME | ||
| + | --owner-map=FILE | ||
| -p, --preserve-permissions, | -p, --preserve-permissions, | ||
| | | ||
| | | ||
| - | --preserve | ||
| --same-owner | --same-owner | ||
| | | ||
| -s, --preserve-order, | -s, --preserve-order, | ||
| - | sort names to extract to match archive | + | member arguments are listed in the same order as |
| + | the files in the archive | ||
| + | --sort=ORDER | ||
| + | inode | ||
| | | ||
| Ligne 335: | Ligne 410: | ||
| -J, --xz | -J, --xz | ||
| --lzip | --lzip | ||
| - | --lzma | + | --lzma |
| - | --lzop | + | --lzop |
| --no-auto-compress | --no-auto-compress | ||
| | | ||
| Ligne 344: | Ligne 419: | ||
| Local file selection: | Local file selection: | ||
| - | --add-file=FILE | ||
| - | | ||
| --backup[=CONTROL] | --backup[=CONTROL] | ||
| - | -C, --directory=DIR | ||
| - | --exclude=PATTERN | ||
| - | --exclude-backups | ||
| - | --exclude-caches | ||
| - | | ||
| - | --exclude-caches-all | ||
| - | --exclude-caches-under exclude everything under directories containing | ||
| - | | ||
| - | --exclude-tag=FILE | ||
| - | | ||
| - | --exclude-tag-all=FILE exclude directories containing FILE | ||
| - | --exclude-tag-under=FILE | ||
| - | | ||
| - | --exclude-vcs | ||
| -h, --dereference | -h, --dereference | ||
| point to | point to | ||
| Ligne 366: | Ligne 425: | ||
| refer to | refer to | ||
| -K, --starting-file=MEMBER-NAME | -K, --starting-file=MEMBER-NAME | ||
| - | begin at member MEMBER-NAME | + | begin at member MEMBER-NAME |
| + | archive | ||
| --newer-mtime=DATE | --newer-mtime=DATE | ||
| - | --no-null | ||
| - | --no-recursion | ||
| - | --no-unquote | ||
| - | --null | ||
| -N, --newer=DATE-OR-FILE, | -N, --newer=DATE-OR-FILE, | ||
| only store files newer than DATE-OR-FILE | only store files newer than DATE-OR-FILE | ||
| --one-file-system | --one-file-system | ||
| - | -P, --absolute-names | + | -P, --absolute-names |
| - | --recursion | + | |
| --suffix=STRING | --suffix=STRING | ||
| | | ||
| | | ||
| - | -T, --files-from=FILE | ||
| - | --unquote | ||
| - | -X, --exclude-from=FILE | ||
| File name transformations: | File name transformations: | ||
| Ligne 391: | Ligne 443: | ||
| use sed replace EXPRESSION to transform file | use sed replace EXPRESSION to transform file | ||
| names | names | ||
| - | |||
| - | File name matching options (affect both exclude and include patterns): | ||
| - | |||
| - | --anchored | ||
| - | --ignore-case | ||
| - | --no-anchored | ||
| - | | ||
| - | --no-ignore-case | ||
| - | --no-wildcards | ||
| - | --no-wildcards-match-slash | ||
| - | --wildcards | ||
| - | --wildcards-match-slash | ||
| | | ||
| Ligne 421: | Ligne 461: | ||
| --show-omitted-dirs | --show-omitted-dirs | ||
| that does not match search criteria | that does not match search criteria | ||
| + | --show-snapshot-field-ranges | ||
| + | show valid ranges for snapshot-file fields | ||
| --show-transformed-names, | --show-transformed-names, | ||
| show file or archive names after transformation | show file or archive names after transformation | ||
| Ligne 449: | Ligne 491: | ||
| for any corresponding short options. | for any corresponding short options. | ||
| - | The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX. | + | The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX. |
| The version control may be set with --backup or VERSION_CONTROL, | The version control may be set with --backup or VERSION_CONTROL, | ||
| Ligne 462: | Ligne 504: | ||
| shell | shell | ||
| shell-always | shell-always | ||
| + | shell-escape | ||
| + | shell-escape-always | ||
| c | c | ||
| c-maybe | c-maybe | ||
| Ligne 471: | Ligne 515: | ||
| --format=gnu -f- -b20 --quoting-style=escape --rmt-command=/ | --format=gnu -f- -b20 --quoting-style=escape --rmt-command=/ | ||
| --rsh-command=/ | --rsh-command=/ | ||
| - | |||
| - | Report bugs to < | ||
| </ | </ | ||
| Ligne 480: | Ligne 522: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| tar: Removing leading `/' from member names | tar: Removing leading `/' from member names | ||
| /test/ | /test/ | ||
| Ligne 495: | Ligne 537: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | drwxr-xr-x root/ | + | drwxr-xr-x root/ |
| - | drwxr-xr-x root/ | + | drwxr-xr-x root/ |
| - | -rw-r--r-- root/ | + | -rw-r--r-- root/ |
| - | -rw-r--r-- root/ | + | -rw-r--r-- root/ |
| - | -rw-r--r-- root/ | + | -rw-r--r-- root/ |
| - | drwxr-xr-x root/ | + | drwxr-xr-x root/ |
| - | -rw-r--r-- root/ | + | -rw-r--r-- root/ |
| - | -rw-r--r-- root/ | + | -rw-r--r-- root/ |
| </ | </ | ||
| Ligne 509: | Ligne 551: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| Ligne 515: | Ligne 557: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| Ligne 524: | Ligne 566: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| tar: Removing leading `/' from member names | tar: Removing leading `/' from member names | ||
| /test/ | /test/ | ||
| Ligne 536: | Ligne 578: | ||
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez l' | **Important** - Notez l' | ||
| </ | </ | ||
| Ligne 543: | Ligne 585: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | drwxr-xr-x root/ | + | drwxr-xr-x root/ |
| - | drwxr-xr-x root/ | + | drwxr-xr-x root/ |
| - | -rw-r--r-- root/ | + | -rw-r--r-- root/ |
| - | drwxr-xr-x root/ | + | drwxr-xr-x root/ |
| - | -rw-r--r-- root/ | + | -rw-r--r-- root/ |
| </ | </ | ||
| Ligne 554: | Ligne 596: | ||
| < | < | ||
| - | [root@centos | + | [root@centos8 |
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez que le système vous permet de supprimer le répertoire **/ | **Important** - Notez que le système vous permet de supprimer le répertoire **/ | ||
| </ | </ | ||
| Ligne 564: | Ligne 606: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| test/ | test/ | ||
| test/repY/ | test/repY/ | ||
| Ligne 579: | Ligne 621: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| /test: | /test: | ||
| total 0 | total 0 | ||
| - | drwxr-xr-x. 2 root root 33 Oct 27 11:24 repY | + | drwxr-xr-x. 2 root root 36 Jun 2 14:05 repY |
| - | drwxr-xr-x. 2 root root 24 Oct 27 11:25 repZ | + | drwxr-xr-x. 2 root root 26 Jun 2 14:05 repZ |
| /test/repY: | /test/repY: | ||
| total 0 | total 0 | ||
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y1 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y2 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y3 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y3 |
| /test/repZ: | /test/repZ: | ||
| total 0 | total 0 | ||
| - | -rw-r--r--. 1 root root 0 Oct 27 11:25 Z1 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Z1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:25 Z2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Z2 |
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez qu'à ce stade les fichiers **/ | **Important** - Notez qu'à ce stade les fichiers **/ | ||
| </ | </ | ||
| Ligne 604: | Ligne 646: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| test/ | test/ | ||
| test/repY/ | test/repY/ | ||
| Ligne 615: | Ligne 657: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| /test: | /test: | ||
| total 0 | total 0 | ||
| - | drwxr-xr-x. 2 root root 33 Oct 27 11:24 repY | + | drwxr-xr-x. 2 root root 36 Jun 2 14:05 repY |
| - | drwxr-xr-x. 2 root root 24 Oct 27 11:25 repZ | + | drwxr-xr-x. 2 root root 26 Jun 2 14:05 repZ |
| /test/repY: | /test/repY: | ||
| total 4 | total 4 | ||
| - | -rw-r--r--. 1 root root 20 Oct 27 11:29 Y1 | + | -rw-r--r--. 1 root root 20 Jun 2 14:08 Y1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y2 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y3 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y3 |
| /test/repZ: | /test/repZ: | ||
| total 4 | total 4 | ||
| - | -rw-r--r--. 1 root root 21 Oct 27 11:29 Z1 | + | -rw-r--r--. 1 root root 21 Jun 2 14:09 Z1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:25 Z2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Z2 |
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez que les fichiers **/ | **Important** - Notez que les fichiers **/ | ||
| </ | </ | ||
| Ligne 659: | Ligne 701: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| Usage: cpio [OPTION...] [destination-directory] | Usage: cpio [OPTION...] [destination-directory] | ||
| GNU `cpio' copies files to and from archives | GNU `cpio' copies files to and from archives | ||
| Ligne 684: | Ligne 726: | ||
| -B Set the I/O block size to 5120 bytes | -B Set the I/O block size to 5120 bytes | ||
| -c | -c | ||
| - | | + | |
| | | ||
| -C, --io-size=NUMBER | -C, --io-size=NUMBER | ||
| bytes | bytes | ||
| + | -D, --directory=DIR | ||
| --force-local | --force-local | ||
| | | ||
| - | -f, --nonmatching | ||
| - | | ||
| - | -F, --file=[[USER@]HOST: | ||
| - | Use this FILE-NAME instead of standard input or | ||
| - | | ||
| - | and host names in case of a remote archive | ||
| -H, --format=FORMAT | -H, --format=FORMAT | ||
| - | -M, --message=STRING | ||
| - | | ||
| - | -n, --numeric-uid-gid | ||
| - | | ||
| --quiet | --quiet | ||
| - | | + | |
| + | | ||
| -v, --verbose | -v, --verbose | ||
| -V, --dot Print a " | -V, --dot Print a " | ||
| Ligne 708: | Ligne 742: | ||
| ' | ' | ||
| | | ||
| + | |||
| + | | ||
| + | |||
| + | -F, --file=[[USER@]HOST: | ||
| + | Use this FILE-NAME instead of standard input or | ||
| + | | ||
| + | and host names in case of a remote archive | ||
| + | -M, --message=STRING | ||
| + | | ||
| + | --rsh-command=COMMAND | ||
| | | ||
| Ligne 713: | Ligne 757: | ||
| -b, --swap | -b, --swap | ||
| | | ||
| + | -f, --nonmatching | ||
| + | | ||
| + | -I [[USER@]HOST: | ||
| + | | ||
| + | names in case of a remote archive | ||
| + | -n, --numeric-uid-gid | ||
| + | | ||
| -r, --rename | -r, --rename | ||
| -s, --swap-bytes | -s, --swap-bytes | ||
| Ligne 728: | Ligne 779: | ||
| -A, --append | -A, --append | ||
| + | --device-independent, | ||
| + | | ||
| + | --ignore-devno | ||
| -O [[USER@]HOST: | -O [[USER@]HOST: | ||
| | | ||
| and host names in case of a remote archive | and host names in case of a remote archive | ||
| + | --renumber-inodes | ||
| | | ||
| Ligne 746: | Ligne 801: | ||
| | | ||
| - | -0, --null | + | -0, --null |
| - | character | + | characters |
| -a, --reset-access-time | -a, --reset-access-time | ||
| them | them | ||
| - | -I [[USER@]HOST: | ||
| - | | ||
| - | names in case of a remote archive | ||
| -L, --dereference | -L, --dereference | ||
| that they point to instead of copying the links). | that they point to instead of copying the links). | ||
| - | -R, --owner=[USER][: | ||
| - | | ||
| | | ||
| Ligne 784: | Ligne 834: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| /test | /test | ||
| /test/repY | /test/repY | ||
| Ligne 796: | Ligne 846: | ||
| </ | </ | ||
| - | Sauvegardez maintenant les fichiers et répertoires référencés par le fichier **/ | + | Sauvegardez maintenant les fichiers et répertoires référencés par le fichier **/ |
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| /test | /test | ||
| /test/repY | /test/repY | ||
| Ligne 814: | Ligne 864: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| /test | /test | ||
| /test/repY | /test/repY | ||
| Ligne 829: | Ligne 879: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| Ligne 835: | Ligne 885: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| /test: | /test: | ||
| total 0 | total 0 | ||
| - | drwxr-xr-x. 2 root root 24 Oct 27 11:25 repZ | + | drwxr-xr-x. 2 root root 26 Jun 2 14:05 repZ |
| /test/repZ: | /test/repZ: | ||
| total 4 | total 4 | ||
| - | -rw-r--r--. 1 root root 21 Oct 27 11:29 Z1 | + | -rw-r--r--. 1 root root 21 Jun 2 14:09 Z1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:25 Z2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Z2 |
| </ | </ | ||
| Ligne 849: | Ligne 899: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| / | / | ||
| / | / | ||
| Ligne 856: | Ligne 906: | ||
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez l' | **Important** - Notez l' | ||
| </ | </ | ||
| Ligne 863: | Ligne 913: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| /test: | /test: | ||
| total 0 | total 0 | ||
| - | drwxr-xr-x. 2 root root 33 Oct 27 11:43 repY | + | drwxr-xr-x. 2 root root 36 Jun 2 14:17 repY |
| - | drwxr-xr-x. 2 root root 24 Oct 27 11:25 repZ | + | drwxr-xr-x. 2 root root 26 Jun 2 14:05 repZ |
| /test/repY: | /test/repY: | ||
| total 4 | total 4 | ||
| - | -rw-r--r--. 1 root root 20 Oct 27 11:29 Y1 | + | -rw-r--r--. 1 root root 20 Jun 2 14:08 Y1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y2 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:24 Y3 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Y3 |
| /test/repZ: | /test/repZ: | ||
| total 4 | total 4 | ||
| - | -rw-r--r--. 1 root root 21 Oct 27 11:29 Z1 | + | -rw-r--r--. 1 root root 21 Jun 2 14:09 Z1 |
| - | -rw-r--r--. 1 root root 0 Oct 27 11:25 Z2 | + | -rw-r--r--. 1 root root 0 Jun 2 14:05 Z2 |
| </ | </ | ||
| Ligne 899: | Ligne 949: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| Usage: dd [OPERAND]... | Usage: dd [OPERAND]... | ||
| or: dd OPTION | or: dd OPTION | ||
| Copy a file, converting and formatting according to the operands. | Copy a file, converting and formatting according to the operands. | ||
| - | bs=BYTES | + | bs=BYTES |
| + | overrides ibs and obs | ||
| cbs=BYTES | cbs=BYTES | ||
| conv=CONVS | conv=CONVS | ||
| Ligne 916: | Ligne 967: | ||
| seek=N | seek=N | ||
| skip=N | skip=N | ||
| - | status=WHICH WHICH info to suppress outputting | + | status=LEVEL The LEVEL of information |
| - | ' | + | ' |
| + | ' | ||
| + | | ||
| N and BYTES may be followed by the following multiplicative suffixes: | N and BYTES may be followed by the following multiplicative suffixes: | ||
| - | c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M | + | c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M, |
| GB =1000*1000*1000, | GB =1000*1000*1000, | ||
| Ligne 953: | Ligne 1006: | ||
| nonblock | nonblock | ||
| noatime | noatime | ||
| - | nocache | + | nocache |
| noctty | noctty | ||
| nofollow | nofollow | ||
| Ligne 962: | Ligne 1015: | ||
| Sending a USR1 signal to a running ' | Sending a USR1 signal to a running ' | ||
| print I/O statistics to standard error and then resume copying. | print I/O statistics to standard error and then resume copying. | ||
| - | |||
| - | $ dd if=/ | ||
| - | $ kill -USR1 $pid; sleep 1; kill $pid | ||
| - | 18335302+0 records in | ||
| - | 18335302+0 records out | ||
| - | 9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s | ||
| Options are: | Options are: | ||
| Ligne 974: | Ligne 1021: | ||
| --version | --version | ||
| - | GNU coreutils online help: <http:// | + | GNU coreutils online help: <https:// |
| - | For complete | + | Full documentation |
| + | or available locally via: info '(coreutils) | ||
| </ | </ | ||
| Ligne 985: | Ligne 1033: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| 446+0 records in | 446+0 records in | ||
| 446+0 records out | 446+0 records out | ||
| - | 446 bytes (446 B) copied, 0.0568353 | + | 446 bytes copied, 0.00202127 |
| </ | </ | ||
| Ligne 994: | Ligne 1042: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| 64+0 records in | 64+0 records in | ||
| 64+0 records out | 64+0 records out | ||
| - | 64 bytes (64 B) copied, 0.000831091 | + | 64 bytes copied, 0.000409593 |
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez l' | **Important** - Notez l' | ||
| </ | </ | ||
| Ligne 1099: | Ligne 1147: | ||
| | **Partclone** | C | GPL | 0.2.89 | | **Partclone** | C | GPL | 0.2.89 | ||
| | **[[https:// | | **[[https:// | ||
| + | |||
| + | ====LAB #4 - Que Sauvegarder en Priorité ?==== | ||
| + | |||
| + | ===Sauvegarde de la Liste des Paquets=== | ||
| + | |||
| + | Supprimez les fichiers de verrouillage de la base de données RPM : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rm -f / | ||
| + | </ | ||
| + | |||
| + | Sauvegardez les bases de données RPM : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# tar czvf $(hostname).rpmdatabase.tar.gz / | ||
| + | tar: Removing leading `/' from member names | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Pour sauvegarder la liste des paquets à l' | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rpm -qa > liste-des-paquets_`hostname`_`date +%Y-%m-%d-%H-%M` | ||
| + | </ | ||
| + | |||
| + | Consultez le contenu de ce fichier : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# more liste-des-paquets_centos8.ittraining.loc_2021-06-02-15-04 | ||
| + | dracut-squash-049-95.git20200804.el8_3.4.x86_64 | ||
| + | gnutls-dane-3.6.14-8.el8_3.x86_64 | ||
| + | mtr-0.92-3.el8.x86_64 | ||
| + | fontpackages-filesystem-1.44-22.el8.noarch | ||
| + | dhcp-libs-4.3.6-41.el8.x86_64 | ||
| + | alsa-lib-1.2.3.2-1.el8.x86_64 | ||
| + | geolite2-city-20180605-1.el8.noarch | ||
| + | cockpit-ws-224.2-1.el8.x86_64 | ||
| + | python3-dbus-1.2.4-15.el8.x86_64 | ||
| + | libvirt-daemon-config-network-6.0.0-28.1.module_el8.3.0+755+88436ea4.x86_64 | ||
| + | samba-client-libs-4.12.3-12.el8.3.x86_64 | ||
| + | libICE-1.0.9-15.el8.x86_64 | ||
| + | bind-license-9.11.20-5.el8_3.1.noarch | ||
| + | dnf-4.2.23-4.el8.noarch | ||
| + | at-spi2-core-2.28.0-1.el8.x86_64 | ||
| + | libssh-config-0.9.4-2.el8.noarch | ||
| + | bzip2-libs-1.0.6-26.el8.x86_64 | ||
| + | python3-syspurpose-1.27.16-1.el8.x86_64 | ||
| + | perl-Unicode-Normalize-1.25-396.el8.x86_64 | ||
| + | centos-linux-release-8.3-1.2011.el8.noarch | ||
| + | sssd-krb5-2.3.0-9.el8.x86_64 | ||
| + | perl-MIME-Base64-3.15-396.el8.x86_64 | ||
| + | glibc-langpack-en-2.28-127.el8.x86_64 | ||
| + | --More--(2%) | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Il convient ensuite de sauvegarder les deux fichiers **liste-des-paquets_*** et **$(hostname).rpmdatabase.tar.gz** sur un support externe. | ||
| + | </ | ||
| + | |||
| + | Afin de restaurer les sauvegardes, | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# cp liste-des-paquets_centos8.ittraining.loc_2021-06-02-15-04 centos8.ittraining.loc.rpmdatabase.tar.gz / | ||
| + | </ | ||
| + | |||
| + | Placez-vous à la racine du système de fichiers et restaurez les bases de données RPM : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# cd / | ||
| + | [root@centos8 /]# tar xvf centos8.ittraining.loc.rpmdatabase.tar.gz | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | var/ | ||
| + | </ | ||
| + | |||
| + | Utilisez YUM pour restaurer les paquets : | ||
| + | |||
| + | < | ||
| + | [root@centos8 /]# yum -y install $(cat liste-des-paquets_centos8.ittraining.loc_2021-06-02-15-04) | ||
| + | </ | ||
| + | |||
| + | ===Sauvegarde d'un Mémo sur la Structure du Disque Dur Système=== | ||
| + | |||
| + | < | ||
| + | [root@centos8 /]# cd ~ | ||
| + | [root@centos8 ~]# fdisk -l /dev/sda > structure.list | ||
| + | [root@centos8 ~]# cat structure.list | ||
| + | Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | Disklabel type: dos | ||
| + | Disk identifier: 0x70b17285 | ||
| + | |||
| + | Device | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Il convient ensuite de sauvegarder le fichier **structure.list** sur un support externe. | ||
| + | </ | ||
| + | |||
| + | ===Sauvegarde d'un Mémo sur les Points de Montage du Disque Dur Système=== | ||
| + | |||
| + | Saisissez la commande suivante : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# df -h | grep " | ||
| + | [root@centos8 ~]# cat montages.list | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Il convient ensuite de sauvegarder le fichier **montages.list** sur un support externe. | ||
| + | </ | ||
| + | |||
| + | ===Sauvegarde du Chargeur de Démarrage=== | ||
| + | |||
| + | ==GRUB Legacy== | ||
| + | |||
| + | # cp / | ||
| + | |||
| + | ==GRUB 2 avec BIOS== | ||
| + | |||
| + | Saisissez les commandes suivantes : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# cp / | ||
| + | [root@centos8 ~]# cp / | ||
| + | </ | ||
| + | |||
| + | ==GRUB 2 avec EFI== | ||
| + | |||
| + | < | ||
| + | # cp / | ||
| + | # cp / | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Il convient ensuite de sauvegarder le fichier **menu.lst** ou **grub.cfg** et le fichier **device.map** sur un support externe. | ||
| + | </ | ||
| + | |||
| + | ===Sauvegarde des Dossiers Utilisateurs=== | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# cp -apv /home/ . | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | '/ | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Il convient ensuite de sauvegarder le dossier **/ | ||
| + | </ | ||
| + | |||
| + | ====La Commande Rsync==== | ||
| + | |||
| + | ===Présentation=== | ||
| + | |||
| + | **Rsync** ou //Remote Sync// est un utilitaire de synchronisation de fichiers qui utilise un algorithme qui minimise la quantité de données copiée en ne copiant que les parties des fichiers qui ont été modifiées. | ||
| + | |||
| + | ===LAB #5 - Travailler avec la Commande rsync=== | ||
| + | |||
| + | Créez les répertoires **/ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# mkdir -p /test/repA; mkdir /test/repB | ||
| + | </ | ||
| + | |||
| + | Créez maintenant 20 fichiers vides dans le répertoire **/ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# touch / | ||
| + | [root@centos8 ~]# ls -l /test/repA/ | ||
| + | total 0 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file1 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file10 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file11 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file12 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file13 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file14 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file15 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file16 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file17 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file18 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file19 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file2 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file20 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file3 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file4 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file5 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file6 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file7 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file8 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file9 | ||
| + | </ | ||
| + | |||
| + | Pout synchroniser les fichiers de **/ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rsync -r /test/repA/ /test/repB | ||
| + | [root@centos8 ~]# ls -l /test/repB/ | ||
| + | total 0 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file1 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file10 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file11 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file12 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file13 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file14 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file15 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file16 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file17 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file18 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file19 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file2 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file20 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file3 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file4 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file5 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file6 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file7 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file8 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:50 file9 | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Notez que l' | ||
| + | </ | ||
| + | |||
| + | Supprimez les fichiers dans **/ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rm -rf / | ||
| + | [root@centos8 ~]# ls -l /test/repB/ | ||
| + | total 0 | ||
| + | </ | ||
| + | |||
| + | Pour synchroniser les fichiers de **/ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rsync -a /test/repA/ /test/repB | ||
| + | [root@centos8 ~]# ls -l /test/repB/ | ||
| + | total 0 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file1 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file10 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file11 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file12 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file13 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file14 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file15 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file16 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file17 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file18 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file19 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file2 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file20 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file3 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file4 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file5 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file6 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file7 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file8 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file9 | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Notez que non seulement l' | ||
| + | </ | ||
| + | |||
| + | De nouveau, supprimez les fichiers dans le répertoire **/ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rm -rf / | ||
| + | [root@centos8 ~]# ls -l /test/repB/ | ||
| + | total 0 | ||
| + | </ | ||
| + | |||
| + | Exécutez maintenant le commande suivante et constatez le résultat : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rsync -a /test/repA /test/repB | ||
| + | [root@centos8 ~]# ls -l /test/repB/ | ||
| + | total 0 | ||
| + | drwxr-xr-x. 2 root root 277 Jun 2 15:49 repA | ||
| + | [root@centos8 ~]# ls -l / | ||
| + | total 0 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file1 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file10 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file11 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file12 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file13 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file14 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file15 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file16 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file17 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file18 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file19 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file2 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file20 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file3 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file4 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file5 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file6 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file7 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file8 | ||
| + | -rw-r--r--. 1 root root 0 Jun 2 15:49 file9 | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Notez que dans ce cas, le caractère **/** est manquant après **repA** dans la commande **rsync -a /test/repA / | ||
| + | </ | ||
| + | |||
| + | Pour éviter des erreurs, la commande **rsync** vous permet de visualiser le résultat de votre commande sans exécuter la commande grâce à l' | ||
| + | |||
| + | De nouveau, supprimez les fichiers dans le répertoire **/ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rm -rf / | ||
| + | [root@centos8 ~]# ls -l /test/repB/ | ||
| + | total 0 | ||
| + | </ | ||
| + | |||
| + | Exécutez la commande ci-dessous : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rsync -anv /test/repA/ /test/repB | ||
| + | sending incremental file list | ||
| + | ./ | ||
| + | file1 | ||
| + | file10 | ||
| + | file11 | ||
| + | file12 | ||
| + | file13 | ||
| + | file14 | ||
| + | file15 | ||
| + | file16 | ||
| + | file17 | ||
| + | file18 | ||
| + | file19 | ||
| + | file2 | ||
| + | file20 | ||
| + | file3 | ||
| + | file4 | ||
| + | file5 | ||
| + | file6 | ||
| + | file7 | ||
| + | file8 | ||
| + | file9 | ||
| + | |||
| + | sent 372 bytes received 79 bytes 902.00 bytes/sec | ||
| + | total size is 0 speedup is 0.00 (DRY RUN) | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Notez que dans ce cas, Le résultat de la synchronisation est d' | ||
| + | </ | ||
| + | |||
| + | Maintenant, exécutez la commande ci-dessous : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rsync -anv /test/repA /test/repB | ||
| + | sending incremental file list | ||
| + | repA/ | ||
| + | repA/file1 | ||
| + | repA/file10 | ||
| + | repA/file11 | ||
| + | repA/file12 | ||
| + | repA/file13 | ||
| + | repA/file14 | ||
| + | repA/file15 | ||
| + | repA/file16 | ||
| + | repA/file17 | ||
| + | repA/file18 | ||
| + | repA/file19 | ||
| + | repA/file2 | ||
| + | repA/file20 | ||
| + | repA/file3 | ||
| + | repA/file4 | ||
| + | repA/file5 | ||
| + | repA/file6 | ||
| + | repA/file7 | ||
| + | repA/file8 | ||
| + | repA/file9 | ||
| + | |||
| + | sent 385 bytes received 80 bytes 930.00 bytes/sec | ||
| + | total size is 0 speedup is 0.00 (DRY RUN) | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Important** - Notez que dans ce cas, Le résultat de la synchronisation est d' | ||
| + | </ | ||
| + | |||
| + | ===Options de la Commande=== | ||
| + | |||
| + | Les options de la commande rsync sont : | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# rsync --help | ||
| + | rsync version 3.1.3 protocol version 31 | ||
| + | Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others. | ||
| + | Web site: http:// | ||
| + | Capabilities: | ||
| + | 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints, | ||
| + | socketpairs, | ||
| + | append, ACLs, xattrs, iconv, symtimes, prealloc | ||
| + | |||
| + | rsync comes with ABSOLUTELY NO WARRANTY. | ||
| + | are welcome to redistribute it under certain conditions. | ||
| + | General Public Licence for details. | ||
| + | |||
| + | rsync is a file transfer program capable of efficient remote update | ||
| + | via a fast differencing algorithm. | ||
| + | |||
| + | Usage: rsync [OPTION]... SRC [SRC]... DEST | ||
| + | or rsync [OPTION]... SRC [SRC]... [USER@]HOST: | ||
| + | or rsync [OPTION]... SRC [SRC]... [USER@]HOST:: | ||
| + | or rsync [OPTION]... SRC [SRC]... rsync:// | ||
| + | or rsync [OPTION]... [USER@]HOST: | ||
| + | or rsync [OPTION]... [USER@]HOST:: | ||
| + | or rsync [OPTION]... rsync:// | ||
| + | The ':' | ||
| + | to an rsync daemon, and require SRC or DEST to start with a module name. | ||
| + | |||
| + | Options | ||
| + | -v, --verbose | ||
| + | | ||
| + | | ||
| + | | ||
| + | -q, --quiet | ||
| + | | ||
| + | -c, --checksum | ||
| + | -a, --archive | ||
| + | | ||
| + | -r, --recursive | ||
| + | -R, --relative | ||
| + | | ||
| + | -b, --backup | ||
| + | | ||
| + | | ||
| + | -u, --update | ||
| + | | ||
| + | | ||
| + | | ||
| + | -d, --dirs | ||
| + | -l, --links | ||
| + | -L, --copy-links | ||
| + | | ||
| + | | ||
| + | | ||
| + | -k, --copy-dirlinks | ||
| + | -K, --keep-dirlinks | ||
| + | -H, --hard-links | ||
| + | -p, --perms | ||
| + | -E, --executability | ||
| + | | ||
| + | -A, --acls | ||
| + | -X, --xattrs | ||
| + | -o, --owner | ||
| + | -g, --group | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | -t, --times | ||
| + | -O, --omit-dir-times | ||
| + | -J, --omit-link-times | ||
| + | | ||
| + | | ||
| + | -S, --sparse | ||
| + | | ||
| + | -n, --dry-run | ||
| + | -W, --whole-file | ||
| + | | ||
| + | -x, --one-file-system | ||
| + | -B, --block-size=SIZE | ||
| + | -e, --rsh=COMMAND | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | -m, --prune-empty-dirs | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | -I, --ignore-times | ||
| + | -M, --remote-option=OPTION | ||
| + | | ||
| + | -@, --modify-window=NUM | ||
| + | -T, --temp-dir=DIR | ||
| + | -y, --fuzzy | ||
| + | | ||
| + | | ||
| + | | ||
| + | -z, --compress | ||
| + | | ||
| + | | ||
| + | -C, --cvs-exclude | ||
| + | -f, --filter=RULE | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | -0, --from0 | ||
| + | -s, --protect-args | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | -8, --8-bit-output | ||
| + | -h, --human-readable | ||
| + | | ||
| + | | ||
| + | -i, --itemize-changes | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | -4, --ipv4 | ||
| + | -6, --ipv6 | ||
| + | | ||
| + | (-h) --help | ||
| + | |||
| + | Use "rsync --daemon --help" | ||
| + | Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation. | ||
| + | See http:// | ||
| + | </ | ||
| =====Compression===== | =====Compression===== | ||
| Ligne 1113: | Ligne 1812: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| Usage: gzip [OPTION]... [FILE]... | Usage: gzip [OPTION]... [FILE]... | ||
| Compress or uncompress FILEs (by default, compress FILES in-place). | Compress or uncompress FILEs (by default, compress FILES in-place). | ||
| Ligne 1123: | Ligne 1822: | ||
| -f, --force | -f, --force | ||
| -h, --help | -h, --help | ||
| + | -k, --keep | ||
| -l, --list | -l, --list | ||
| -L, --license | -L, --license | ||
| - | -n, --no-name | + | -n, --no-name |
| - | -N, --name | + | -N, --name |
| -q, --quiet | -q, --quiet | ||
| -r, --recursive | -r, --recursive | ||
| + | --rsyncable | ||
| -S, --suffix=SUF | -S, --suffix=SUF | ||
| + | --synchronous synchronous output (safer if system crashes, but slower) | ||
| -t, --test | -t, --test | ||
| -v, --verbose | -v, --verbose | ||
| Ligne 1135: | Ligne 1837: | ||
| -1, --fast | -1, --fast | ||
| -9, --best | -9, --best | ||
| - | --rsyncable | ||
| With no FILE, or when FILE is -, read standard input. | With no FILE, or when FILE is -, read standard input. | ||
| Ligne 1145: | Ligne 1846: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | Usage: /bin/gunzip [OPTION]... [FILE]... | + | Usage: |
| Uncompress FILEs (by default, in-place). | Uncompress FILEs (by default, in-place). | ||
| Ligne 1153: | Ligne 1854: | ||
| -c, --stdout | -c, --stdout | ||
| -f, --force | -f, --force | ||
| + | -k, --keep | ||
| -l, --list | -l, --list | ||
| - | -n, --no-name | + | -n, --no-name |
| - | -N, --name | + | -N, --name |
| -q, --quiet | -q, --quiet | ||
| -r, --recursive | -r, --recursive | ||
| -S, --suffix=SUF | -S, --suffix=SUF | ||
| + | --synchronous synchronous output (safer if system crashes, but slower) | ||
| -t, --test | -t, --test | ||
| -v, --verbose | -v, --verbose | ||
| Ligne 1169: | Ligne 1872: | ||
| </ | </ | ||
| - | ===LAB #4 - Travaller | + | ===LAB #6 - Travailler |
| Utilisez **gzip** pour compresser votre fichier tar : | Utilisez **gzip** pour compresser votre fichier tar : | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| Ligne 1180: | Ligne 1883: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | -rw-r--r--. 1 root root 219 Oct 27 11:27 / | + | -rw-r--r--. 1 root root 218 Jun 2 14:07 / |
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu. | **Important** - Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu. | ||
| </ | </ | ||
| Ligne 1191: | Ligne 1894: | ||
| < | < | ||
| - | [root@centos | + | [root@centos8 |
| </ | </ | ||
| Ligne 1205: | Ligne 1908: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| bzip2, a block-sorting file compressor. | bzip2, a block-sorting file compressor. | ||
| Ligne 1238: | Ligne 1941: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| bzip2, a block-sorting file compressor. | bzip2, a block-sorting file compressor. | ||
| Ligne 1268: | Ligne 1971: | ||
| </ | </ | ||
| - | ===LAB #5 - Travailler avec la Commande bzip2=== | + | ===LAB #7 - Travailler avec la Commande bzip2=== |
| Utilisez **bzip2** pour compresser votre fichier tar : | Utilisez **bzip2** pour compresser votre fichier tar : | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| Ligne 1279: | Ligne 1982: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | -rw-r--r--. 1 root root 206 Oct 27 11:27 test.tar.bz2 | + | -rw-r--r--. 1 root root 206 Jun 2 14:07 test.tar.bz2 |
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu. | **Important** - Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu. | ||
| </ | </ | ||
| Ligne 1290: | Ligne 1993: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| Ligne 1322: | Ligne 2025: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| Usage: xz [OPTION]... [FILE]... | Usage: xz [OPTION]... [FILE]... | ||
| Compress or decompress FILEs in the .xz format. | Compress or decompress FILEs in the .xz format. | ||
| -z, --compress | -z, --compress | ||
| - | -d, --decompress, --uncompress | + | -d, --decompress |
| - | | + | |
| -t, --test | -t, --test | ||
| -l, --list | -l, --list | ||
| -k, --keep | -k, --keep | ||
| -f, --force | -f, --force | ||
| - | -c, --stdout, --to-stdout | + | -c, --stdout |
| - | | + | |
| -0 ... -9 | -0 ... -9 | ||
| decompressor memory usage into account before using 7-9! | decompressor memory usage into account before using 7-9! | ||
| Ligne 1340: | Ligne 2041: | ||
| does not affect decompressor memory requirements | does not affect decompressor memory requirements | ||
| -T, --threads=NUM | -T, --threads=NUM | ||
| - | to use the number of processor cores | + | to use as many threads as there are processor cores |
| -q, --quiet | -q, --quiet | ||
| -v, --verbose | -v, --verbose | ||
| Ligne 1350: | Ligne 2051: | ||
| Report bugs to < | Report bugs to < | ||
| - | XZ Utils home page: <http:// | + | XZ Utils home page: <https:// |
| </ | </ | ||
| - | ===LAB #6 - Travailler avec la Commande xz=== | + | ===LAB #8 - Travailler avec la Commande xz=== |
| Utilisez **xz** pour compresser votre fichier tar : | Utilisez **xz** pour compresser votre fichier tar : | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez que le fonctionnement par défaut de la commande est identique à celui de l' | **Important** - Notez que le fonctionnement par défaut de la commande est identique à celui de l' | ||
| </ | </ | ||
| Ligne 1368: | Ligne 2069: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | -rw-r--r--. 1 root root 232 Oct 27 11:27 test.tar.xz | + | -rw-r--r--. 1 root root 228 Jun 2 14:07 test.tar.xz |
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu. Le fichier source peut être maintenue si l' | **Important** - Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu. Le fichier source peut être maintenue si l' | ||
| </ | </ | ||
| Ligne 1379: | Ligne 2080: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| - | -rw-rw-r--. 1 trainee trainee | + | -rw-r--r--. 1 root root 512 Jun 2 14:15 test.cpio |
| - | -rw-r--r--. 1 root root 512 Oct 27 11:40 test.cpio | + | -rw-r--r--. 1 root root 10240 Jun 2 14:07 test.tar |
| - | -rw-r--r--. 1 root root 10240 Oct 27 11:27 test.tar | + | |
| </ | </ | ||
| Ligne 1396: | Ligne 2096: | ||
| ----- | ----- | ||
| - | < | + | Copyright © 2024 Hugh Norris. |
| - | <div align=" | + | |
| - | Copyright © 2020 Hugh Norris. | + | |
| - | </ | + | |