Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
elearning:workbooks:centos:8:junior:l111 [2021/06/02 15:34] – created adminelearning:workbooks:centos:8:junior:l111 [2024/09/12 09:17] (Version actuelle) admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
 +
 +Version : **2024.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
  
-======LCF206 - Gestion de l'Archivage et de la Compression======+======LCF506 - Gestion de l'Archivage et de la Compression======
  
 =====Contenu du Module===== =====Contenu du Module=====
  
-  * **LCF206 - Gestion de l'Archivage et de la Compression**+  * **LCF506 - Gestion de l'Archivage et de la Compression**
     * 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 #- Travaller avec la Commande gzip+        * LAB #- Travaller avec la Commande gzip
       * La Commande bzip2       * La Commande bzip2
         * Présentation         * Présentation
-        * LAB #- Travailler avec la Commande bzip2+        * LAB #- Travailler avec la Commande bzip2
       * La Commande xz       * La Commande xz
         * Présentation         * Présentation
-        * LAB #- Travailler avec la Commande xz+        * LAB #- Travailler avec la Commande xz
       * Autres Utilitaires       * Autres Utilitaires
  
Ligne 135: Ligne 149:
  
 <code> <code>
-[root@centos7 ~]# mkdir -p /test/repY; mkdir /test/repZ +[root@centos8 ~]# mkdir -p /test/repY; mkdir /test/repZ 
-[root@centos7 ~]# cd /test/repY; touch Y1 Y2 Y3 +[root@centos8 ~]# cd /test/repY; touch Y1 Y2 Y3 
-[root@centos7 repY]#  cd /test/repZ; touch Z1 Z2 +[root@centos8 repY]# cd /test/repZ; touch Z1 Z2 
-[root@centos7 repZ]# ls -lR /test+[root@centos8 repZ]# ls -lR /test
 /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
 </code> </code>
  
Ligne 173: Ligne 187:
  
 <code> <code>
-[root@centos7 repZ]# tar --help+[root@centos8 repZ]# tar --help
 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         # List all files in archive.tar verbosely.   tar -tvf archive.tar         # List all files in archive.tar verbosely.
   tar -xf archive.tar          # Extract all files from archive.tar.   tar -xf archive.tar          # Extract all files from archive.tar.
 +
 + Local file name selection:
 +
 +      --add-file=FILE        add given FILE to the archive (useful if its name
 +                             starts with a dash)
 +  -C, --directory=DIR        change to directory DIR
 +      --exclude=PATTERN      exclude files, given as a PATTERN
 +      --exclude-backups      exclude backup and lock files
 +      --exclude-caches       exclude contents of directories containing
 +                             CACHEDIR.TAG, except for the tag file itself
 +      --exclude-caches-all   exclude directories containing CACHEDIR.TAG
 +      --exclude-caches-under exclude everything under directories containing
 +                             CACHEDIR.TAG
 +      --exclude-ignore=FILE  read exclude patterns for each directory from
 +                             FILE, if it exists
 +      --exclude-ignore-recursive=FILE
 +                             read exclude patterns for each directory and its
 +                             subdirectories from FILE, if it exists
 +      --exclude-tag=FILE     exclude contents of directories containing FILE,
 +                             except for FILE itself
 +      --exclude-tag-all=FILE exclude directories containing FILE
 +      --exclude-tag-under=FILE   exclude everything under directories
 +                             containing FILE
 +      --exclude-vcs          exclude version control system directories
 +      --exclude-vcs-ignores  read exclude patterns from the VCS ignore files
 +      --no-null              disable the effect of the previous --null option
 +      --no-recursion         avoid descending automatically in directories
 +      --no-unquote           do not unquote input file or member names
 +      --no-verbatim-files-from   -T treats file names starting with dash as
 +                             options (default)
 +      --null                 -T reads null-terminated names; implies
 +                             --verbatim-files-from
 +      --recursion            recurse into directories (default)
 +  -T, --files-from=FILE      get names to extract or create from FILE
 +      --unquote              unquote input file or member names (default)
 +      --verbatim-files-from  -T reads file names verbatim (no escape or option
 +                             handling)
 +  -X, --exclude-from=FILE    exclude patterns listed in FILE
 +
 + File name matching options (affect both exclude and include patterns):
 +
 +      --anchored             patterns match file name start
 +      --ignore-case          ignore case
 +      --no-anchored          patterns match after any '/' (default for
 +                             exclusion)
 +      --no-ignore-case       case sensitive matching (default)
 +      --no-wildcards         verbatim string matching
 +      --no-wildcards-match-slash   wildcards do not match '/'
 +      --wildcards            use wildcards (default)
 +      --wildcards-match-slash   wildcards match '/' (default for exclusion)
  
  Main operation mode:  Main operation mode:
Ligne 201: Ligne 265:
   -g, --listed-incremental=FILE   handle new GNU-format incremental backup   -g, --listed-incremental=FILE   handle new GNU-format incremental backup
   -G, --incremental          handle old GNU-format incremental backup   -G, --incremental          handle old GNU-format incremental backup
 +      --hole-detection=TYPE  technique to detect holes
       --ignore-failed-read   do not exit with nonzero on unreadable files       --ignore-failed-read   do not exit with nonzero on unreadable files
       --level=NUMBER         dump level for created listed-incremental archive       --level=NUMBER         dump level for created listed-incremental archive
Ligne 222: Ligne 287:
   -k, --keep-old-files       don't replace existing files when extracting,   -k, --keep-old-files       don't replace existing files when extracting,
                              treat them as errors                              treat them as errors
 +      --keep-directory-symlink   preserve existing symlinks to directories when
 +                             extracting
       --keep-newer-files     don't replace existing files that are newer than       --keep-newer-files     don't replace existing files that are newer than
                              their archive copies                              their archive copies
       --no-overwrite-dir     preserve metadata of existing directories       --no-overwrite-dir     preserve metadata of existing directories
 +      --one-top-level[=DIR]  create a subdirectory to avoid having loose files
 +                             extracted
       --overwrite            overwrite existing files when extracting       --overwrite            overwrite existing files when extracting
       --overwrite-dir        overwrite metadata of existing directories when       --overwrite-dir        overwrite metadata of existing directories when
Ligne 249: Ligne 318:
                              (METHOD='replace'; default) or by not setting the                              (METHOD='replace'; default) or by not setting the
                              times in the first place (METHOD='system')                              times in the first place (METHOD='system')
 +      --clamp-mtime          only set time when the file is more recent than
 +                             what was given with --mtime
       --delay-directory-restore   delay setting modification times and       --delay-directory-restore   delay setting modification times and
                              permissions of extracted directories until the end                              permissions of extracted directories until the end
                              of extraction                              of extraction
       --group=NAME           force NAME as group for added files       --group=NAME           force NAME as group for added files
 +      --group-map=FILE       use FILE to map file owner GIDs and names
       --mode=CHANGES         force (symbolic) mode CHANGES for added files       --mode=CHANGES         force (symbolic) mode CHANGES for added files
       --mtime=DATE-OR-FILE   set mtime for added files from DATE-OR-FILE       --mtime=DATE-OR-FILE   set mtime for added files from DATE-OR-FILE
Ligne 265: Ligne 337:
       --numeric-owner        always use numbers for user/group names       --numeric-owner        always use numbers for user/group names
       --owner=NAME           force NAME as owner for added files       --owner=NAME           force NAME as owner for added files
 +      --owner-map=FILE       use FILE to map file owner UIDs and names
   -p, --preserve-permissions, --same-permissions   -p, --preserve-permissions, --same-permissions
                              extract information about file permissions                              extract information about file permissions
                              (default for superuser)                              (default for superuser)
-      --preserve             same as both -p and -s 
       --same-owner           try extracting files with the same ownership as       --same-owner           try extracting files with the same ownership as
                              exists in the archive (default for superuser)                              exists in the archive (default for superuser)
   -s, --preserve-order, --same-order   -s, --preserve-order, --same-order
-                             sort names to extract to match archive+                             member arguments are listed in the same order as 
 +                             the files in the archive 
 +      --sort=ORDER           directory sorting order: none (default), name or 
 +                             inode
  
  Handling of extended file attributes:  Handling of extended file attributes:
Ligne 335: Ligne 410:
   -J, --xz                   filter the archive through xz   -J, --xz                   filter the archive through xz
       --lzip                 filter the archive through lzip       --lzip                 filter the archive through lzip
-      --lzma                 filter the archive through lzma +      --lzma                 filter the archive through xz --format=lzma 
-      --lzop+      --lzop                 filter the archive through lzop
       --no-auto-compress     do not use archive suffix to determine the       --no-auto-compress     do not use archive suffix to determine the
                              compression program                              compression program
Ligne 344: Ligne 419:
  Local file selection:  Local file selection:
  
-      --add-file=FILE        add given FILE to the archive (useful if its name 
-                             starts with a dash) 
       --backup[=CONTROL]     backup before removal, choose version CONTROL       --backup[=CONTROL]     backup before removal, choose version CONTROL
-  -C, --directory=DIR        change to directory DIR 
-      --exclude=PATTERN      exclude files, given as a PATTERN 
-      --exclude-backups      exclude backup and lock files 
-      --exclude-caches       exclude contents of directories containing 
-                             CACHEDIR.TAG, except for the tag file itself 
-      --exclude-caches-all   exclude directories containing CACHEDIR.TAG 
-      --exclude-caches-under exclude everything under directories containing 
-                             CACHEDIR.TAG 
-      --exclude-tag=FILE     exclude contents of directories containing FILE, 
-                             except for FILE itself 
-      --exclude-tag-all=FILE exclude directories containing FILE 
-      --exclude-tag-under=FILE   exclude everything under directories 
-                             containing FILE 
-      --exclude-vcs          exclude version control system directories 
   -h, --dereference          follow symlinks; archive and dump the files they   -h, --dereference          follow symlinks; archive and dump the files they
                              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 in the archive+                             begin at member MEMBER-NAME when reading the 
 +                             archive
       --newer-mtime=DATE     compare date and time when data changed only       --newer-mtime=DATE     compare date and time when data changed only
-      --no-null              disable the effect of the previous --null option 
-      --no-recursion         avoid descending automatically in directories 
-      --no-unquote           do not unquote filenames read with -T 
-      --null                 -T reads null-terminated names, disable -C 
   -N, --newer=DATE-OR-FILE, --after-date=DATE-OR-FILE   -N, --newer=DATE-OR-FILE, --after-date=DATE-OR-FILE
                              only store files newer than DATE-OR-FILE                              only store files newer than DATE-OR-FILE
       --one-file-system      stay in local file system when creating archive       --one-file-system      stay in local file system when creating archive
-  -P, --absolute-names       don't strip leading `/'s from file names +  -P, --absolute-names       don't strip leading '/'s from file names
-      --recursion            recurse into directories (default)+
       --suffix=STRING        backup before removal, override usual suffix ('~'       --suffix=STRING        backup before removal, override usual suffix ('~'
                              unless overridden by environment variable                              unless overridden by environment variable
                              SIMPLE_BACKUP_SUFFIX)                              SIMPLE_BACKUP_SUFFIX)
-  -T, --files-from=FILE      get names to extract or create from FILE 
-      --unquote              unquote filenames read with -T (default) 
-  -X, --exclude-from=FILE    exclude patterns listed in 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             patterns match file name start 
-      --ignore-case          ignore case 
-      --no-anchored          patterns match after any `/' (default for 
-                             exclusion) 
-      --no-ignore-case       case sensitive matching (default) 
-      --no-wildcards         verbatim string matching 
-      --no-wildcards-match-slash   wildcards do not match `/' 
-      --wildcards            use wildcards (default) 
-      --wildcards-match-slash   wildcards match `/' (default for exclusion) 
  
  Informative output:  Informative output:
Ligne 421: Ligne 461:
       --show-omitted-dirs    when listing or extracting, list each directory       --show-omitted-dirs    when listing or extracting, list each directory
                              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-stored-names       --show-transformed-names, --show-stored-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, values are: The version control may be set with --backup or VERSION_CONTROL, values are:
  
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=/etc/rmt --format=gnu -f- -b20 --quoting-style=escape --rmt-command=/etc/rmt
 --rsh-command=/usr/bin/ssh --rsh-command=/usr/bin/ssh
- 
-Report bugs to <bug-tar@gnu.org>. 
 </code> </code>
  
Ligne 480: Ligne 522:
  
 <code> <code>
-[root@centos7 repZ]# tar cvf /tmp/test.tar /test+[root@centos8 repZ]# tar cvf /tmp/test.tar /test
 tar: Removing leading `/' from member names tar: Removing leading `/' from member names
 /test/ /test/
Ligne 495: Ligne 537:
  
 <code> <code>
-[root@centos7 repZ]# tar tvf /tmp/test.tar +[root@centos8 repZ]# tar tvf /tmp/test.tar 
-drwxr-xr-x root/root         2015-10-27 11:24 test/ +drwxr-xr-x root/root         2021-06-02 14:04 test/ 
-drwxr-xr-x root/root         2015-10-27 11:24 test/repY/ +drwxr-xr-x root/root         2021-06-02 14:05 test/repY/ 
--rw-r--r-- root/root         2015-10-27 11:24 test/repY/Y1 +-rw-r--r-- root/root         2021-06-02 14:05 test/repY/Y1 
--rw-r--r-- root/root         2015-10-27 11:24 test/repY/Y2 +-rw-r--r-- root/root         2021-06-02 14:05 test/repY/Y2 
--rw-r--r-- root/root         2015-10-27 11:24 test/repY/Y3 +-rw-r--r-- root/root         2021-06-02 14:05 test/repY/Y3 
-drwxr-xr-x root/root         2015-10-27 11:25 test/repZ/ +drwxr-xr-x root/root         2021-06-02 14:05 test/repZ/ 
--rw-r--r-- root/root         2015-10-27 11:25 test/repZ/Z1 +-rw-r--r-- root/root         2021-06-02 14:05 test/repZ/Z1 
--rw-r--r-- root/root         2015-10-27 11:25 test/repZ/Z2+-rw-r--r-- root/root         2021-06-02 14:05 test/repZ/Z2
 </code> </code>
  
Ligne 509: Ligne 551:
  
 <code> <code>
-[root@centos7 repZ]# touch /tmp/dateref+[root@centos8 repZ]# touch /tmp/dateref
 </code> </code>
  
Ligne 515: Ligne 557:
  
 <code> <code>
-[root@centos7 repZ]# echo "CentOS est super \!" > /test/repY/Y1 +[root@centos8 repZ]# echo "CentOS est super \!" > /test/repY/Y1 
-[root@centos7 repZ]# echo "RHEL is wonderful \!" > /test/repZ/Z1+[root@centos8 repZ]# echo "RHEL is wonderful \!" > /test/repZ/Z1
 </code> </code>
  
Ligne 524: Ligne 566:
  
 <code> <code>
-[root@centos7 repZ]# tar -cvf /tmp/incremental.tar -N /tmp/dateref /test+[root@centos8 repZ]# tar -cvf /tmp/incremental.tar -N /tmp/dateref /test
 tar: Removing leading `/' from member names tar: Removing leading `/' from member names
 /test/ /test/
Ligne 536: Ligne 578:
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **Important** - Notez l'utilisation de l'option **-N** avec l’argument **/tmp/dateref** qui permet d'identifier les fichiers modifiés ou créés depuis la création de **/tmp/dateref**. **Important** - Notez l'utilisation de l'option **-N** avec l’argument **/tmp/dateref** qui permet d'identifier les fichiers modifiés ou créés depuis la création de **/tmp/dateref**.
 </WRAP> </WRAP>
Ligne 543: Ligne 585:
  
 <code> <code>
-[root@centos7 repZ]# tar tvf /tmp/incremental.tar +[root@centos8 repZ]# tar tvf /tmp/incremental.tar 
-drwxr-xr-x root/root         2015-10-27 11:24 test/ +drwxr-xr-x root/root         2021-06-02 14:04 test/ 
-drwxr-xr-x root/root         2015-10-27 11:24 test/repY/ +drwxr-xr-x root/root         2021-06-02 14:05 test/repY/ 
--rw-r--r-- root/root        20 2015-10-27 11:29 test/repY/Y1 +-rw-r--r-- root/root        20 2021-06-02 14:08 test/repY/Y1 
-drwxr-xr-x root/root         2015-10-27 11:25 test/repZ/ +drwxr-xr-x root/root         2021-06-02 14:05 test/repZ/ 
--rw-r--r-- root/root        21 2015-10-27 11:29 test/repZ/Z1+-rw-r--r-- root/root        21 2021-06-02 14:09 test/repZ/Z1
 </code> </code>
  
Ligne 554: Ligne 596:
  
 <code> <code>
-[root@centos repZ]# rm -rf /test/*+[root@centos8 repZ]# rm -rf /test/*
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **Important** - Notez que le système vous permet de supprimer le répertoire **/test/repZ**, or vous vous situez dans ce même répertoire ! **Important** - Notez que le système vous permet de supprimer le répertoire **/test/repZ**, or vous vous situez dans ce même répertoire !
 </WRAP> </WRAP>
Ligne 564: Ligne 606:
  
 <code> <code>
-[root@centos7 repZ]# cd / +[root@centos8 repZ]# cd / 
-[root@centos7 /]# tar xvf /tmp/test.tar+[root@centos8 /]# tar xvf /tmp/test.tar
 test/ test/
 test/repY/ test/repY/
Ligne 579: Ligne 621:
  
 <code> <code>
-[root@centos7 /]# ls -lR /test+[root@centos8 /]# ls -lR /test
 /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
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **Important** - Notez qu'à ce stade les fichiers **/test/repY/Y1** et **/test/repZ/Z1** sont vides. **Important** - Notez qu'à ce stade les fichiers **/test/repY/Y1** et **/test/repZ/Z1** sont vides.
 </WRAP> </WRAP>
Ligne 604: Ligne 646:
  
 <code> <code>
-[root@centos7 /]# tar xvf /tmp/incremental.tar+[root@centos8 /]# tar xvf /tmp/incremental.tar
 test/ test/
 test/repY/ test/repY/
Ligne 615: Ligne 657:
  
 <code> <code>
-[root@centos7 /]# ls -lR /test+[root@centos8 /]# ls -lR /test
 /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
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **Important** - Notez que les fichiers **/test/repY/Y1** et **/test/repZ/Z1** sont maintenant non-vides. **Important** - Notez que les fichiers **/test/repY/Y1** et **/test/repZ/Z1** sont maintenant non-vides.
 </WRAP> </WRAP>
Ligne 659: Ligne 701:
  
 <code> <code>
-[root@centos7 /]# cpio --help+[root@centos8 /]# cpio --help
 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                         Identical to "-H newc", use the new (SVR4)   -c                         Identical to "-H newc", use the new (SVR4)
-                             portable format.If you wish the old portable+                             portable format. If you wish the old portable
                              (ASCII) archive format, use "-H odc" instead.                              (ASCII) archive format, use "-H odc" instead.
   -C, --io-size=NUMBER       Set the I/O block size to the given NUMBER of   -C, --io-size=NUMBER       Set the I/O block size to the given NUMBER of
                              bytes                              bytes
 +  -D, --directory=DIR        Change to directory DIR
       --force-local          Archive file is local, even if its name contains       --force-local          Archive file is local, even if its name contains
                              colons                              colons
-  -f, --nonmatching          Only copy files that do not match any of the given 
-                             patterns 
-  -F, --file=[[USER@]HOST:]FILE-NAME 
-                             Use this FILE-NAME instead of standard input or 
-                             output. Optional USER and HOST specify the user 
-                             and host names in case of a remote archive 
   -H, --format=FORMAT        Use given archive FORMAT   -H, --format=FORMAT        Use given archive FORMAT
-  -M, --message=STRING       Print STRING when the end of a volume of the 
-                             backup media is reached 
-  -n, --numeric-uid-gid      In the verbose table of contents listing, show 
-                             numeric UID and GID 
       --quiet                Do not print the number of blocks copied       --quiet                Do not print the number of blocks copied
-      --rsh-command=COMMAND  Use remote COMMAND instead of rsh+  -R, --owner=[USER][:.][GROUP]   Set the ownership of all files created to the 
 +                             specified USER and/or GROUP
   -v, --verbose              Verbosely list the files processed   -v, --verbose              Verbosely list the files processed
   -V, --dot                  Print a "." for each file processed   -V, --dot                  Print a "." for each file processed
Ligne 708: Ligne 742:
                              'none', 'truncate', 'all'. Multiple options                              'none', 'truncate', 'all'. Multiple options
                              accumulate.                              accumulate.
 +
 + Operation modifiers valid in copy-in and copy-out modes
 +
 +  -F, --file=[[USER@]HOST:]FILE-NAME
 +                             Use this FILE-NAME instead of standard input or
 +                             output. Optional USER and HOST specify the user
 +                             and host names in case of a remote archive
 +  -M, --message=STRING       Print STRING when the end of a volume of the
 +                             backup media is reached
 +      --rsh-command=COMMAND  Use COMMAND instead of rsh
  
  Operation modifiers valid only in copy-in mode:  Operation modifiers valid only in copy-in mode:
Ligne 713: Ligne 757:
   -b, --swap                 Swap both halfwords of words and bytes of   -b, --swap                 Swap both halfwords of words and bytes of
                              halfwords in the data. Equivalent to -sS                              halfwords in the data. Equivalent to -sS
 +  -f, --nonmatching          Only copy files that do not match any of the given
 +                             patterns
 +  -I [[USER@]HOST:]FILE-NAME Archive filename to use instead of standard input.
 +                             Optional USER and HOST specify the user and host
 +                             names in case of a remote archive
 +  -n, --numeric-uid-gid      In the verbose table of contents listing, show
 +                             numeric UID and GID
   -r, --rename               Interactively rename files   -r, --rename               Interactively rename files
   -s, --swap-bytes           Swap the bytes of each halfword in the files   -s, --swap-bytes           Swap the bytes of each halfword in the files
Ligne 728: Ligne 779:
  
   -A, --append               Append to an existing archive.   -A, --append               Append to an existing archive.
 +      --device-independent, --reproducible
 +                             Create device-independent (reproducible) archives
 +      --ignore-devno         Don't store device numbers
   -O [[USER@]HOST:]FILE-NAME Archive filename to use instead of standard   -O [[USER@]HOST:]FILE-NAME Archive filename to use instead of standard
                              output. Optional USER and HOST specify the user                              output. Optional USER and HOST specify the user
                              and host names in case of a remote archive                              and host names in case of a remote archive
 +      --renumber-inodes      Renumber inodes
  
  Operation modifiers valid only in copy-pass mode:  Operation modifiers valid only in copy-pass mode:
Ligne 746: Ligne 801:
  Operation modifiers valid in copy-out and copy-pass modes:  Operation modifiers valid in copy-out and copy-pass modes:
  
-  -0, --null                 list of filenames is terminated by null +  -0, --null                 Filenames in the list are delimited by null 
-                             character instead of a newline+                             characters instead of newlines
   -a, --reset-access-time    Reset the access times of files after reading   -a, --reset-access-time    Reset the access times of files after reading
                              them                              them
-  -I [[USER@]HOST:]FILE-NAME Archive filename to use instead of standard input. 
-                             Optional USER and HOST specify the user and host 
-                             names in case of a remote archive 
   -L, --dereference          Dereference  symbolic  links  (copy  the files   -L, --dereference          Dereference  symbolic  links  (copy  the files
                              that they point to instead of copying the links).                              that they point to instead of copying the links).
-  -R, --owner=[USER][:.][GROUP]   Set the ownership of all files created to the 
-                             specified USER and/or GROUP 
  
  Operation modifiers valid in copy-in and copy-pass modes:  Operation modifiers valid in copy-in and copy-pass modes:
Ligne 784: Ligne 834:
  
 <code> <code>
-[root@centos7 /]# find /test > /tmp/cpio.liste +[root@centos8 /]# find /test > /tmp/cpio.list 
-[root@centos7 /]# cat /tmp/cpio.liste+[root@centos8 /]# cat /tmp/cpio.list
 /test /test
 /test/repY /test/repY
Ligne 796: Ligne 846:
 </code> </code>
  
-Sauvegardez maintenant les fichiers et répertoires référencés par le fichier **/tmp/cpio.liste** :+Sauvegardez maintenant les fichiers et répertoires référencés par le fichier **/tmp/cpio.list** :
  
 <code> <code>
-[root@centos7 /]# cpio -ov < /tmp/cpio.liste > /tmp/test.cpio+[root@centos8 /]# cpio -ov < /tmp/cpio.list > /tmp/test.cpio
 /test /test
 /test/repY /test/repY
Ligne 814: Ligne 864:
  
 <code> <code>
-[root@centos7 /]# cpio -it < /tmp/test.cpio+[root@centos8 /]# cpio -it < /tmp/test.cpio
 /test /test
 /test/repY /test/repY
Ligne 829: Ligne 879:
  
 <code> <code>
-[root@centos7 /]# rm -rf /test/repY+[root@centos8 /]# rm -rf /test/repY
 </code> </code>
  
Ligne 835: Ligne 885:
  
 <code> <code>
-[root@centos7 /]# ls -lR /test+[root@centos8 /]# ls -lR /test
 /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
 </code> </code>
  
Ligne 849: Ligne 899:
  
 <code> <code>
-[root@centos7 /]# cpio -ivdum "/test/repY/*" < /tmp/test.cpio+[root@centos8 /]# cpio -ivdum "/test/repY/*" < /tmp/test.cpio
 /test/repY/Y2 /test/repY/Y2
 /test/repY/Y3 /test/repY/Y3
Ligne 856: Ligne 906:
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **Important** - Notez l'utilisation de la chaîne **"/test/repY/*"** qui permet de rechercher uniquement le répertoire **repY** ainsi que les fichiers **Y1**, **Y2** et **Y3** dans l'archive test.cpio. **Important** - Notez l'utilisation de la chaîne **"/test/repY/*"** qui permet de rechercher uniquement le répertoire **repY** ainsi que les fichiers **Y1**, **Y2** et **Y3** dans l'archive test.cpio.
 </WRAP> </WRAP>
Ligne 863: Ligne 913:
  
 <code> <code>
-[root@centos7 /]# ls -lR /test+[root@centos8 /]# ls -lR /test
 /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
 </code> </code>
  
Ligne 899: Ligne 949:
  
 <code> <code>
-[root@centos7 /]# dd --help+[root@centos8 /]# dd --help
 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        read and write up to BYTES bytes at a time+  bs=BYTES        read and write up to BYTES bytes at a time (default: 512); 
 +                  overrides ibs and obs
   cbs=BYTES       convert BYTES bytes at a time   cbs=BYTES       convert BYTES bytes at a time
   conv=CONVS      convert the file as per the comma separated symbol list   conv=CONVS      convert the file as per the comma separated symbol list
Ligne 916: Ligne 967:
   seek=N          skip N obs-sized blocks at start of output   seek=N          skip N obs-sized blocks at start of output
   skip=N          skip N ibs-sized blocks at start of input   skip=N          skip N ibs-sized blocks at start of input
-  status=WHICH    WHICH info to suppress outputting to stderr; +  status=LEVEL    The LEVEL of information to print to stderr; 
-                  'noxfer' suppresses transfer stats, 'nonesuppresses all+                  'none' suppresses everything but error messages, 
 +                  'noxfer' suppresses the final transfer statistics, 
 +                  'progressshows periodic transfer statistics
  
 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, G =1024*1024*1024, and so on for T, P, E, Z, Y. GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.
  
Ligne 953: Ligne 1006:
   nonblock  use non-blocking I/O   nonblock  use non-blocking I/O
   noatime   do not update access time   noatime   do not update access time
-  nocache   discard cached data+  nocache   Request to drop cache.  See also oflag=sync
   noctty    do not assign controlling terminal from file   noctty    do not assign controlling terminal from file
   nofollow  do not follow symlinks   nofollow  do not follow symlinks
Ligne 962: Ligne 1015:
 Sending a USR1 signal to a running 'dd' process makes it Sending a USR1 signal to a running 'dd' process makes it
 print I/O statistics to standard error and then resume copying. print I/O statistics to standard error and then resume copying.
- 
-  $ dd if=/dev/zero of=/dev/null& pid=$! 
-  $ 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  output version information and exit       --version  output version information and exit
  
-GNU coreutils online help: <http://www.gnu.org/software/coreutils/> +GNU coreutils online help: <https://www.gnu.org/software/coreutils/> 
-For complete documentation, runinfo coreutils 'dd invocation'+Full documentation at<https://www.gnu.org/software/coreutils/dd> 
 +or available locally via: info '(coreutils) dd invocation'
 </code> </code>
  
Ligne 985: Ligne 1033:
  
 <code> <code>
-[root@centos7 /]# dd if=/dev/sda of=/tmp/mbr.save bs=1 count=446+[root@centos8 /]# dd if=/dev/sda of=/tmp/mbr.save bs=1 count=446
 446+0 records in 446+0 records in
 446+0 records out 446+0 records out
-446 bytes (446 B) copied, 0.0568353 s, 7.8 kB/s+446 bytes copied, 0.00202127 s, 221 kB/s
 </code> </code>
  
Ligne 994: Ligne 1042:
  
 <code> <code>
-[root@centos7 /]# dd if=/dev/sda of=/tmp/tblpart.save bs=1 count=64 skip=446+[root@centos8 /]# dd if=/dev/sda of=/tmp/tblpart.save bs=1 count=64 skip=446
 64+0 records in 64+0 records in
 64+0 records out 64+0 records out
-64 bytes (64 B) copied, 0.000831091 s, 77.0 kB/s+64 bytes copied, 0.000409593 s, 156 kB/s
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **Important** - Notez l'utilisation de l'option **skip** qui permet de positionner le début de la sauvegarde au 447ième octet. **Important** - Notez l'utilisation de l'option **skip** qui permet de positionner le début de la sauvegarde au 447ième octet.
 </WRAP> </WRAP>
Ligne 1099: Ligne 1147:
 | **Partclone** |  C  |  GPL  |  0.2.89  |  05/07/2016  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://partclone.org/|Partclone]]** | | **Partclone** |  C  |  GPL  |  0.2.89  |  05/07/2016  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://partclone.org/|Partclone]]** |
 | **[[https://en.wikipedia.org/wiki/Partimage|partimage]]** |  C  |  GPL  |  0.6.9    25/07/2010  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[http://www.partimage.org/|Partimage]]** | | **[[https://en.wikipedia.org/wiki/Partimage|partimage]]** |  C  |  GPL  |  0.6.9    25/07/2010  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[http://www.partimage.org/|Partimage]]** |
 +
 +====LAB #4 - Que Sauvegarder en Priorité ?====
 +
 +===Sauvegarde de la Liste des Paquets===
 +
 +Supprimez les fichiers de verrouillage de la base de données RPM :
 +
 +<code>
 +[root@centos8 ~]# rm -f /var/lib/rpm/__db*
 +</code>
 +
 +Sauvegardez les bases de données RPM :
 +
 +<code>
 +[root@centos8 ~]# tar czvf $(hostname).rpmdatabase.tar.gz /var/lib/rpm
 +tar: Removing leading `/' from member names
 +/var/lib/rpm/
 +/var/lib/rpm/.dbenv.lock
 +/var/lib/rpm/Packages
 +/var/lib/rpm/Conflictname
 +/var/lib/rpm/Name
 +/var/lib/rpm/Basenames
 +/var/lib/rpm/Group
 +/var/lib/rpm/Requirename
 +/var/lib/rpm/Providename
 +/var/lib/rpm/Obsoletename
 +/var/lib/rpm/Triggername
 +/var/lib/rpm/Dirnames
 +/var/lib/rpm/Installtid
 +/var/lib/rpm/Sigmd5
 +/var/lib/rpm/Sha1header
 +/var/lib/rpm/Filetriggername
 +/var/lib/rpm/Transfiletriggername
 +/var/lib/rpm/Recommendname
 +/var/lib/rpm/Suggestname
 +/var/lib/rpm/Supplementname
 +/var/lib/rpm/Enhancename
 +/var/lib/rpm/.rpm.lock
 +</code>
 +
 +Pour sauvegarder la liste des paquets à l'identique en termes de version, utilisez la commande RPM :
 +
 +<code>
 +[root@centos8 ~]# rpm -qa > liste-des-paquets_`hostname`_`date +%Y-%m-%d-%H-%M`
 +</code>
 +
 +Consultez le contenu de ce fichier :
 +
 +<code>
 +[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%)
 +</code>
 +
 +<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.
 +</WRAP>
 +
 +Afin de restaurer les sauvegardes, récupérez les deux fichiers  **liste-des-paquets_*** et **$(hostname).rpmdatabase.tar.gz** du support externe à la racine du système de fichiers :
 +
 +<code>
 +[root@centos8 ~]# cp liste-des-paquets_centos8.ittraining.loc_2021-06-02-15-04 centos8.ittraining.loc.rpmdatabase.tar.gz /
 +</code>
 +
 +Placez-vous à la racine du système de fichiers et restaurez les bases de données RPM :
 +
 +<code>
 +[root@centos8 ~]# cd /
 +[root@centos8 /]# tar xvf centos8.ittraining.loc.rpmdatabase.tar.gz 
 +var/lib/rpm/
 +var/lib/rpm/.dbenv.lock
 +var/lib/rpm/Packages
 +var/lib/rpm/Conflictname
 +var/lib/rpm/Name
 +var/lib/rpm/Basenames
 +var/lib/rpm/Group
 +var/lib/rpm/Requirename
 +var/lib/rpm/Providename
 +var/lib/rpm/Obsoletename
 +var/lib/rpm/Triggername
 +var/lib/rpm/Dirnames
 +var/lib/rpm/Installtid
 +var/lib/rpm/Sigmd5
 +var/lib/rpm/Sha1header
 +var/lib/rpm/Filetriggername
 +var/lib/rpm/Transfiletriggername
 +var/lib/rpm/Recommendname
 +var/lib/rpm/Suggestname
 +var/lib/rpm/Supplementname
 +var/lib/rpm/Enhancename
 +var/lib/rpm/.rpm.loc
 +</code>
 +
 +Utilisez YUM pour restaurer les paquets :
 +
 +<code>
 +[root@centos8 /]# yum -y install $(cat liste-des-paquets_centos8.ittraining.loc_2021-06-02-15-04)
 +</code>
 +
 +===Sauvegarde d'un Mémo sur la Structure du Disque Dur Système===
 +
 +<code>
 +[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/physical): 512 bytes / 512 bytes
 +I/O size (minimum/optimal): 512 bytes / 512 bytes
 +Disklabel type: dos
 +Disk identifier: 0x70b17285
 +
 +Device     Boot   Start      End  Sectors  Size Id Type
 +/dev/sda1  *       2048   616447   614400  300M 83 Linux
 +/dev/sda2        616448  4712447  4096000    2G 82 Linux swap / Solaris
 +/dev/sda3       4712448 35432447 30720000 14.7G 83 Linux
 +</code>
 +
 +<WRAP center round important 60%>
 +**Important** - Il convient ensuite de sauvegarder le fichier **structure.list** sur un support externe.
 +</WRAP>
 +
 +===Sauvegarde d'un Mémo sur les Points de Montage du Disque Dur Système===
 +
 +Saisissez la commande suivante :
 +
 +<code>
 +[root@centos8 ~]# df -h | grep "^/dev/" > montages.list
 +[root@centos8 ~]# cat montages.list 
 +/dev/sda3        15G  2.7G   13G  18% /
 +/dev/sda1       283M  194M   70M  74% /boot
 +</code>
 +
 +<WRAP center round important 60%>
 +**Important** - Il convient ensuite de sauvegarder le fichier **montages.list** sur un support externe.
 +</WRAP>
 +
 +===Sauvegarde du Chargeur de Démarrage===
 +
 +==GRUB Legacy==
 +
 +  # cp /boot/grub/menu.lst grubmenu.lst
 +
 +==GRUB 2 avec BIOS==
 +
 +Saisissez les commandes suivantes :
 +
 +<code>
 +[root@centos8 ~]# cp /boot/grub2/grub.cfg grub.cfg
 +[root@centos8 ~]# cp /boot/grub2/device.map device.map
 +</code>
 +
 +==GRUB 2 avec EFI==
 +
 +<code>
 +# cp /boot/efi/EFI/redhat/grub.cfg grub.cfg
 +# cp /boot/grub2/device.map device.map
 +</code>
 +
 +<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.
 +</WRAP>
 +
 +===Sauvegarde des Dossiers Utilisateurs===
 +
 +<code>
 +[root@centos8 ~]# cp -apv /home/ .
 +'/home/' -> './home'
 +'/home/trainee' -> './home/trainee'
 +'/home/trainee/.viminfo' -> './home/trainee/.viminfo'
 +'/home/trainee/typescript' -> './home/trainee/typescript'
 +'/home/trainee/bin' -> './home/trainee/bin'
 +'/home/trainee/bin/myscript' -> './home/trainee/bin/myscript'
 +'/home/trainee/abc' -> './home/trainee/abc'
 +'/home/trainee/bca' -> './home/trainee/bca'
 +'/home/trainee/file2' -> './home/trainee/file2'
 +'/home/trainee/xyz' -> './home/trainee/xyz'
 +'/home/trainee/file1' -> './home/trainee/file1'
 +'/home/trainee/file' -> './home/trainee/file'
 +'/home/trainee/.bash_logout' -> './home/trainee/.bash_logout'
 +'/home/trainee/.bash_profile' -> './home/trainee/.bash_profile'
 +'/home/trainee/.bashrc' -> './home/trainee/.bashrc'
 +'/home/trainee/.bash_history' -> './home/trainee/.bash_history'
 +'/home/trainee/tux.jpg' -> './home/trainee/tux.jpg'
 +'/home/trainee/tux1.jpg' -> './home/trainee/tux1.jpg'
 +'/home/trainee/pwd.txt' -> './home/trainee/pwd.txt'
 +'/home/trainee/errorlog' -> './home/trainee/errorlog'
 +'/home/trainee/backup.acl' -> './home/trainee/backup.acl'
 +'/home/trainee/aac' -> './home/trainee/aac'
 +'/home/trainee/rep1' -> './home/trainee/rep1'
 +'/home/trainee/rep1/fichier1' -> './home/trainee/rep1/fichier1'
 +'/home/trainee/rep1/backup.acl' -> './home/trainee/rep1/backup.acl'
 +'/home/trainee/training' -> './home/trainee/training'
 +'/home/trainee/training/f1' -> './home/trainee/training/f1'
 +'/home/trainee/training/f2' -> './home/trainee/training/f2'
 +'/home/trainee/training/f3' -> './home/trainee/training/f3'
 +'/home/trainee/training/f4' -> './home/trainee/training/f4'
 +'/home/trainee/training/f5' -> './home/trainee/training/f5'
 +'/home/trainee/training/f52' -> './home/trainee/training/f52'
 +'/home/trainee/training/f62' -> './home/trainee/training/f62'
 +'/home/trainee/training/a100' -> './home/trainee/training/a100'
 +'/home/trainee/training/f' -> './home/trainee/training/f'
 +'/home/trainee/training/f.txt' -> './home/trainee/training/f.txt'
 +'/home/trainee/training/f123.txt' -> './home/trainee/training/f123.txt'
 +'/home/trainee/training/f123123.txt' -> './home/trainee/training/f123123.txt'
 +'/home/trainee/training/f123123123.txt' -> './home/trainee/training/f123123123.txt'
 +'/home/trainee/training/file' -> './home/trainee/training/file'
 +'/home/trainee/training/user_check' -> './home/trainee/training/user_check'
 +'/home/trainee/codes' -> './home/trainee/codes'
 +'/home/trainee/codes/exit.txt' -> './home/trainee/codes/exit.txt'
 +'/home/fenestros2' -> './home/fenestros2'
 +'/home/fenestros2/.bash_logout' -> './home/fenestros2/.bash_logout'
 +'/home/fenestros2/.bash_history' -> './home/fenestros2/.bash_history'
 +'/home/fenestros2/.bash_profile' -> './home/fenestros2/.bash_profile'
 +'/home/fenestros2/.bashrc' -> './home/fenestros2/.bashrc'
 +'/home/fenestros1' -> './home/fenestros1'
 +'/home/fenestros1/.bash_logout' -> './home/fenestros1/.bash_logout'
 +'/home/fenestros1/.bash_profile' -> './home/fenestros1/.bash_profile'
 +'/home/fenestros1/.bashrc' -> './home/fenestros1/.bashrc'
 +</code>
 +
 +<WRAP center round important 60%>
 +**Important** - Il convient ensuite de sauvegarder le dossier **/root/home** sur un support externe.
 +</WRAP>
 +
 +====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 **/test/repA** et mkdir **/test/repB** :
 +
 +<code>
 +[root@centos8 ~]# mkdir -p /test/repA; mkdir /test/repB
 +</code>
 +
 +Créez maintenant 20 fichiers vides dans le répertoire **/test/repA** :
 +
 +<code>
 +[root@centos8 ~]# touch /test/repA/file{1..20}
 +[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
 +</code>
 +
 +Pout synchroniser les fichiers de **/test/repA** vers le répertoire **/test/repB**, utilisez l'option **-r** de la commande rsync :
 +
 +<code>
 +[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
 +</code>
 +
 +<WRAP center round important 60%>
 +**Important** - Notez que l'horodatage des fichiers synchronisés n'a pas été préservé.
 +</WRAP>
 +
 +Supprimez les fichiers dans **/test/repB** :
 +
 +<code>
 +[root@centos8 ~]# rm -rf /test/repB/*
 +[root@centos8 ~]# ls -l /test/repB/
 +total 0
 +</code>
 +
 +Pour synchroniser les fichiers de **/test/repA** vers le répertoire **/test/repB**, utilisez l'option **-a** de la commande rsync :
 +
 +<code>
 +[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
 +</code>
 +
 +<WRAP center round important 60%>
 +**Important** - Notez que non seulement l'option **-a** de la commande **rsync** synchronise les fichiers d'une manière récursive, toute comme l'option **-r**, mais elle préserve aussi les fichiers spéciaux, les liens symboliques, les permissions, les propriétaires, les groupes ainsi que les dates de modification des fichiers.
 +</WRAP>
 +
 +De nouveau, supprimez les fichiers dans le répertoire **/test/repB** :
 +
 +<code>
 +[root@centos8 ~]# rm -rf /test/repB/*
 +[root@centos8 ~]# ls -l /test/repB/
 +total 0
 +</code>
 +
 +Exécutez maintenant le commande suivante et constatez le résultat :
 +
 +<code>
 +[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 /test/repB/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
 +</code>
 +
 +<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 /test/repB**. Le résultat est la synchronisation du **répertoire** **/test/repA** vers **/test/repB**.
 +</WRAP>
 +
 +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'utilisation des options **-n** et **-r**.
 +
 +De nouveau, supprimez les fichiers dans le répertoire **/test/repB** :
 +
 +<code>
 +[root@centos8 ~]# rm -rf /test/repB/*
 +[root@centos8 ~]# ls -l /test/repB/
 +total 0
 +</code>
 +
 +Exécutez la commande ci-dessous :
 +
 +<code>
 +[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)
 +</code>
 +
 +<WRAP center round important 60%>
 +**Important** - Notez que dans ce cas, Le résultat de la synchronisation est d'envoyer le **contenu** du répertoire **/test/repA** vers **/test/repB**.
 +</WRAP>
 +
 +Maintenant, exécutez la commande ci-dessous :
 +
 +<code>
 +[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)
 +</code>
 +
 +<WRAP center round important 60%>
 +**Important** - Notez que dans ce cas, Le résultat de la synchronisation est d'envoyer le répertoire **/test/repA** vers **/test/repB**.
 +</WRAP>
 +
 +===Options de la Commande===
 +
 +Les options de la commande rsync sont :
 +
 +<code>
 +[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://rsync.samba.org/
 +Capabilities:
 +    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
 +    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
 +    append, ACLs, xattrs, iconv, symtimes, prealloc
 +
 +rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
 +are welcome to redistribute it under certain conditions.  See the GNU
 +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:DEST
 +  or   rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST
 +  or   rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST
 +  or   rsync [OPTION]... [USER@]HOST:SRC [DEST]
 +  or   rsync [OPTION]... [USER@]HOST::SRC [DEST]
 +  or   rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]
 +The ':' usages connect via remote shell, while '::' & 'rsync://' usages connect
 +to an rsync daemon, and require SRC or DEST to start with a module name.
 +
 +Options
 + -v, --verbose               increase verbosity
 +     --info=FLAGS            fine-grained informational verbosity
 +     --debug=FLAGS           fine-grained debug verbosity
 +     --msgs2stderr           special output handling for debugging
 + -q, --quiet                 suppress non-error messages
 +     --no-motd               suppress daemon-mode MOTD (see manpage caveat)
 + -c, --checksum              skip based on checksum, not mod-time & size
 + -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
 +     --no-OPTION             turn off an implied OPTION (e.g. --no-D)
 + -r, --recursive             recurse into directories
 + -R, --relative              use relative path names
 +     --no-implied-dirs       don't send implied dirs with --relative
 + -b, --backup                make backups (see --suffix & --backup-dir)
 +     --backup-dir=DIR        make backups into hierarchy based in DIR
 +     --suffix=SUFFIX         set backup suffix (default ~ w/o --backup-dir)
 + -u, --update                skip files that are newer on the receiver
 +     --inplace               update destination files in-place (SEE MAN PAGE)
 +     --append                append data onto shorter files
 +     --append-verify         like --append, but with old data in file checksum
 + -d, --dirs                  transfer directories without recursing
 + -l, --links                 copy symlinks as symlinks
 + -L, --copy-links            transform symlink into referent file/dir
 +     --copy-unsafe-links     only "unsafe" symlinks are transformed
 +     --safe-links            ignore symlinks that point outside the source tree
 +     --munge-links           munge symlinks to make them safer (but unusable)
 + -k, --copy-dirlinks         transform symlink to a dir into referent dir
 + -K, --keep-dirlinks         treat symlinked dir on receiver as dir
 + -H, --hard-links            preserve hard links
 + -p, --perms                 preserve permissions
 + -E, --executability         preserve the file's executability
 +     --chmod=CHMOD           affect file and/or directory permissions
 + -A, --acls                  preserve ACLs (implies --perms)
 + -X, --xattrs                preserve extended attributes
 + -o, --owner                 preserve owner (super-user only)
 + -g, --group                 preserve group
 +     --devices               preserve device files (super-user only)
 +     --copy-devices          copy device contents as regular file
 +     --specials              preserve special files
 + -D                          same as --devices --specials
 + -t, --times                 preserve modification times
 + -O, --omit-dir-times        omit directories from --times
 + -J, --omit-link-times       omit symlinks from --times
 +     --super                 receiver attempts super-user activities
 +     --fake-super            store/recover privileged attrs using xattrs
 + -S, --sparse                turn sequences of nulls into sparse blocks
 +     --preallocate           allocate dest files before writing them
 + -n, --dry-run               perform a trial run with no changes made
 + -W, --whole-file            copy files whole (without delta-xfer algorithm)
 +     --checksum-choice=STR   choose the checksum algorithms
 + -x, --one-file-system       don't cross filesystem boundaries
 + -B, --block-size=SIZE       force a fixed checksum block-size
 + -e, --rsh=COMMAND           specify the remote shell to use
 +     --rsync-path=PROGRAM    specify the rsync to run on the remote machine
 +     --existing              skip creating new files on receiver
 +     --ignore-existing       skip updating files that already exist on receiver
 +     --remove-source-files   sender removes synchronized files (non-dirs)
 +     --del                   an alias for --delete-during
 +     --delete                delete extraneous files from destination dirs
 +     --delete-before         receiver deletes before transfer, not during
 +     --delete-during         receiver deletes during the transfer
 +     --delete-delay          find deletions during, delete after
 +     --delete-after          receiver deletes after transfer, not during
 +     --delete-excluded       also delete excluded files from destination dirs
 +     --ignore-missing-args   ignore missing source args without error
 +     --delete-missing-args   delete missing source args from destination
 +     --ignore-errors         delete even if there are I/O errors
 +     --force                 force deletion of directories even if not empty
 +     --max-delete=NUM        don't delete more than NUM files
 +     --max-size=SIZE         don't transfer any file larger than SIZE
 +     --min-size=SIZE         don't transfer any file smaller than SIZE
 +     --partial               keep partially transferred files
 +     --partial-dir=DIR       put a partially transferred file into DIR
 +     --delay-updates         put all updated files into place at transfer's end
 + -m, --prune-empty-dirs      prune empty directory chains from the file-list
 +     --numeric-ids           don't map uid/gid values by user/group name
 +     --usermap=STRING        custom username mapping
 +     --groupmap=STRING       custom groupname mapping
 +     --chown=USER:GROUP      simple username/groupname mapping
 +     --timeout=SECONDS       set I/O timeout in seconds
 +     --contimeout=SECONDS    set daemon connection timeout in seconds
 + -I, --ignore-times          don't skip files that match in size and mod-time
 + -M, --remote-option=OPTION  send OPTION to the remote side only
 +     --size-only             skip files that match in size
 + -@, --modify-window=NUM     set the accuracy for mod-time comparisons
 + -T, --temp-dir=DIR          create temporary files in directory DIR
 + -y, --fuzzy                 find similar file for basis if no dest file
 +     --compare-dest=DIR      also compare destination files relative to DIR
 +     --copy-dest=DIR         ... and include copies of unchanged files
 +     --link-dest=DIR         hardlink to files in DIR when unchanged
 + -z, --compress              compress file data during the transfer
 +     --compress-level=NUM    explicitly set compression level
 +     --skip-compress=LIST    skip compressing files with a suffix in LIST
 + -C, --cvs-exclude           auto-ignore files the same way CVS does
 + -f, --filter=RULE           add a file-filtering RULE
 + -F                          same as --filter='dir-merge /.rsync-filter'
 +                             repeated: --filter='- .rsync-filter'
 +     --exclude=PATTERN       exclude files matching PATTERN
 +     --exclude-from=FILE     read exclude patterns from FILE
 +     --include=PATTERN       don't exclude files matching PATTERN
 +     --include-from=FILE     read include patterns from FILE
 +     --files-from=FILE       read list of source-file names from FILE
 + -0, --from0                 all *-from/filter files are delimited by 0s
 + -s, --protect-args          no space-splitting; only wildcard special-chars
 +     --address=ADDRESS       bind address for outgoing socket to daemon
 +     --port=PORT             specify double-colon alternate port number
 +     --sockopts=OPTIONS      specify custom TCP options
 +     --blocking-io           use blocking I/O for the remote shell
 +     --stats                 give some file-transfer stats
 + -8, --8-bit-output          leave high-bit chars unescaped in output
 + -h, --human-readable        output numbers in a human-readable format
 +     --progress              show progress during transfer
 + -P                          same as --partial --progress
 + -i, --itemize-changes       output a change-summary for all updates
 +     --out-format=FORMAT     output updates using the specified FORMAT
 +     --log-file=FILE         log what we're doing to the specified FILE
 +     --log-file-format=FMT   log updates using the specified FMT
 +     --password-file=FILE    read daemon-access password from FILE
 +     --list-only             list the files instead of copying them
 +     --bwlimit=RATE          limit socket I/O bandwidth
 +     --outbuf=N|L|B          set output buffering to None, Line, or Block
 +     --write-batch=FILE      write a batched update to FILE
 +     --only-write-batch=FILE like --write-batch but w/o updating destination
 +     --read-batch=FILE       read a batched update from FILE
 +     --protocol=NUM          force an older protocol version to be used
 +     --iconv=CONVERT_SPEC    request charset conversion of filenames
 +     --checksum-seed=NUM     set block/file checksum seed (advanced)
 + -4, --ipv4                  prefer IPv4
 + -6, --ipv6                  prefer IPv6
 +     --version               print version number
 +(-h) --help                  show this help (-h is --help only if used alone)
 +
 +Use "rsync --daemon --help" to see the daemon-mode command-line options.
 +Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation.
 +See http://rsync.samba.org/ for updates, bug reports, and answers
 +</code>
  
 =====Compression===== =====Compression=====
Ligne 1113: Ligne 1812:
  
 <code> <code>
-[root@centos7 /]# gzip --help+[root@centos8 /]# gzip --help
 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       force overwrite of output file and compress links   -f, --force       force overwrite of output file and compress links
   -h, --help        give this help   -h, --help        give this help
 +  -k, --keep        keep (don't delete) input files
   -l, --list        list compressed file contents   -l, --list        list compressed file contents
   -L, --license     display software license   -L, --license     display software license
-  -n, --no-name     do not save or restore the original name and time stamp +  -n, --no-name     do not save or restore the original name and timestamp 
-  -N, --name        save or restore the original name and time stamp+  -N, --name        save or restore the original name and timestamp
   -q, --quiet       suppress all warnings   -q, --quiet       suppress all warnings
   -r, --recursive   operate recursively on directories   -r, --recursive   operate recursively on directories
 +      --rsyncable   make rsync-friendly archive
   -S, --suffix=SUF  use suffix SUF on compressed files   -S, --suffix=SUF  use suffix SUF on compressed files
 +      --synchronous synchronous output (safer if system crashes, but slower)
   -t, --test        test compressed file integrity   -t, --test        test compressed file integrity
   -v, --verbose     verbose mode   -v, --verbose     verbose mode
Ligne 1135: Ligne 1837:
   -1, --fast        compress faster   -1, --fast        compress faster
   -9, --best        compress better   -9, --best        compress better
-    --rsyncable   Make rsync-friendly archive 
  
 With no FILE, or when FILE is -, read standard input. With no FILE, or when FILE is -, read standard input.
Ligne 1145: Ligne 1846:
  
 <code> <code>
-[root@centos7 /]# gunzip --help +[root@centos8 /]# gunzip --help 
-Usage: /bin/gunzip [OPTION]... [FILE]...+Usage: /usr/bin/gunzip [OPTION]... [FILE]...
 Uncompress FILEs (by default, in-place). Uncompress FILEs (by default, in-place).
  
Ligne 1153: Ligne 1854:
   -c, --stdout      write on standard output, keep original files unchanged   -c, --stdout      write on standard output, keep original files unchanged
   -f, --force       force overwrite of output file and compress links   -f, --force       force overwrite of output file and compress links
 +  -k, --keep        keep (don't delete) input files
   -l, --list        list compressed file contents   -l, --list        list compressed file contents
-  -n, --no-name     do not save or restore the original name and time stamp +  -n, --no-name     do not save or restore the original name and timestamp 
-  -N, --name        save or restore the original name and time stamp+  -N, --name        save or restore the original name and timestamp
   -q, --quiet       suppress all warnings   -q, --quiet       suppress all warnings
   -r, --recursive   operate recursively on directories   -r, --recursive   operate recursively on directories
   -S, --suffix=SUF  use suffix SUF on compressed files   -S, --suffix=SUF  use suffix SUF on compressed files
 +      --synchronous synchronous output (safer if system crashes, but slower)
   -t, --test        test compressed file integrity   -t, --test        test compressed file integrity
   -v, --verbose     verbose mode   -v, --verbose     verbose mode
Ligne 1169: Ligne 1872:
 </code> </code>
  
-===LAB #Travaller avec la Commande gzip===+===LAB #Travailler avec la Commande gzip===
  
 Utilisez **gzip** pour compresser votre fichier tar : Utilisez **gzip** pour compresser votre fichier tar :
  
 <code> <code>
-[root@centos7 /]# gzip /tmp/test.tar+[root@centos8 /]# gzip /tmp/test.tar
 </code> </code>
  
Ligne 1180: Ligne 1883:
  
 <code> <code>
-[root@centos7 /]# ls -l /tmp/test.tar.gz +[root@centos8 /]# ls -l /tmp/test.tar.gz 
--rw-r--r--. 1 root root 219 Oct 27 11:27 /tmp/test.tar.gz+-rw-r--r--. 1 root root 218 Jun  2 14:07 /tmp/test.tar.gz
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **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.
 </WRAP> </WRAP>
Ligne 1191: Ligne 1894:
  
 <code> <code>
-[root@centos /]# gunzip /tmp/test.tar.gz +[root@centos8 /]# gunzip /tmp/test.tar.gz 
 </code> </code>
  
Ligne 1205: Ligne 1908:
  
 <code> <code>
-[root@centos7 /]# bzip2 --help+[root@centos8 /]# bzip2 --help
 bzip2, a block-sorting file compressor.  Version 1.0.6, 6-Sept-2010. bzip2, a block-sorting file compressor.  Version 1.0.6, 6-Sept-2010.
  
Ligne 1238: Ligne 1941:
  
 <code> <code>
-[root@centos7 /]# bunzip2 --help+[root@centos8 /]# bunzip2 --help
 bzip2, a block-sorting file compressor.  Version 1.0.6, 6-Sept-2010. bzip2, a block-sorting file compressor.  Version 1.0.6, 6-Sept-2010.
  
Ligne 1268: Ligne 1971:
 </code> </code>
  
-===LAB #- Travailler avec la Commande bzip2===+===LAB #- Travailler avec la Commande bzip2===
  
 Utilisez **bzip2** pour compresser votre fichier tar : Utilisez **bzip2** pour compresser votre fichier tar :
  
 <code> <code>
-[root@centos7 /]# bzip2 /tmp/test.tar+[root@centos8 /]# bzip2 /tmp/test.tar
 </code> </code>
  
Ligne 1279: Ligne 1982:
  
 <code> <code>
-[root@centos7 /]# ls -l /tmp | grep test.tar.bz2 +[root@centos8 /]# ls -l /tmp | grep test.tar.bz 
--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
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **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.
 </WRAP> </WRAP>
Ligne 1290: Ligne 1993:
  
 <code> <code>
-[root@centos7 /]# bunzip2 /tmp/test.tar.bz2+[root@centos8 /]# bunzip2 /tmp/test.tar.bz2
 </code> </code>
  
Ligne 1322: Ligne 2025:
  
 <code> <code>
-[root@centos7 /]# xz --help+[root@centos8 /]# xz --help
 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      force compression   -z, --compress      force compression
-  -d, --decompress, --uncompress +  -d, --decompress    force decompression
-                      force decompression+
   -t, --test          test compressed file integrity   -t, --test          test compressed file integrity
   -l, --list          list information about .xz files   -l, --list          list information about .xz files
   -k, --keep          keep (don't delete) input files   -k, --keep          keep (don't delete) input files
   -f, --force         force overwrite of output file and (de)compress links   -f, --force         force overwrite of output file and (de)compress links
-  -c, --stdout, --to-stdout +  -c, --stdout        write to standard output and don't delete input files
-                      write to standard output and don't delete input files+
   -0 ... -9           compression preset; default is 6; take compressor *and*   -0 ... -9           compression preset; default is 6; take compressor *and*
                       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   use at most NUM threads; the default is 1; set to 0   -T, --threads=NUM   use at most NUM threads; the default is 1; set to 0
-                      to use the number of processor cores+                      to use as many threads as there are processor cores
   -q, --quiet         suppress warnings; specify twice to suppress errors too   -q, --quiet         suppress warnings; specify twice to suppress errors too
   -v, --verbose       be verbose; specify twice for even more verbose   -v, --verbose       be verbose; specify twice for even more verbose
Ligne 1350: Ligne 2051:
  
 Report bugs to <lasse.collin@tukaani.org> (in English or Finnish). Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).
-XZ Utils home page: <http://tukaani.org/xz/>+XZ Utils home page: <https://tukaani.org/xz/>
 </code> </code>
  
-===LAB #- Travailler avec la Commande xz===+===LAB #- Travailler avec la Commande xz===
  
 Utilisez **xz** pour compresser votre fichier tar : Utilisez **xz** pour compresser votre fichier tar :
  
 <code> <code>
-[root@centos7 /]# xz /tmp/test.tar +[root@centos8 /]# xz /tmp/test.tar 
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **Important** - Notez que le fonctionnement par défaut de la commande est identique à celui de l'option **-z**.  **Important** - Notez que le fonctionnement par défaut de la commande est identique à celui de l'option **-z**. 
 </WRAP> </WRAP>
Ligne 1368: Ligne 2069:
  
 <code> <code>
-[root@centos7 /]# ls -l /tmp | grep test.tar.xz +[root@centos8 /]# ls -l /tmp | grep test.tar.xz 
--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
 </code> </code>
  
-<WRAP center round important>+<WRAP center round important 60%>
 **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'option **--keep** est spécifiée. Si le fichier test.tar.xz avait déjà existé, la commande aurait échouée avec un message d'erreur. L'extension du fichier est **.xz**, cependant la commande peut aussi gérer l'extension **.lzma**. **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'option **--keep** est spécifiée. Si le fichier test.tar.xz avait déjà existé, la commande aurait échouée avec un message d'erreur. L'extension du fichier est **.xz**, cependant la commande peut aussi gérer l'extension **.lzma**.
 </WRAP> </WRAP>
Ligne 1379: Ligne 2080:
  
 <code> <code>
-[root@centos7 /]# xz -d /tmp/test.tar.xz +[root@centos8 /]# xz -d /tmp/test.tar.xz 
-[root@centos7 /]# ls -l /tmp | grep test +[root@centos8 /]# ls -l /tmp | grep test 
--rw-rw-r--. 1 trainee trainee     0 Oct 15 13:31 test +-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+
 </code> </code>
  
Ligne 1396: Ligne 2096:
  
 ----- -----
-<html> +Copyright © 2024 Hugh Norris.
-<div align="center"> +
-Copyright © 2020 Hugh Norris. +
-</html>+
Menu