Data Loss Prevention   «Prev 

Archives Verbose Option

Question: What are the most important verbose options for creating archives in Red Hat Linux?
Creating archives on a Red Hat Linux system typically involves the use of command line utilities like tar, gzip, or bzip2. These utilities come with several options to customize the process of creating archives, and verbosity is one of those options. Verbosity gives you detailed output about the operations being performed. Here are the most important verbosity options for creating archives in Red Hat Linux:
  1. -v option for tar: The -v option stands for "verbose". When this option is used with tar, it lists all the files that are being processed. For example, the command tar -cvf archive.tar directory/ will create an archive of a directory and list each file as it's added to the archive.
  2. -v option for gzip and bzip2: Similarly to tar, the -v option with gzip and bzip2 provides a verbose output. When compressing or decompressing files, the command lists the name and compression ratio for each file. For example, gzip -v file.txt will show the original and compressed file sizes, and the compression ratio.
  3. --verbose option for cpio:When creating an archive with cpio, the --verbose option provides detailed output. The command find . -depth -print0 | cpio --null --verbose -o > archive.cpio, will list every file that's being added to the cpio archive.
  4. v option in zip: The v option in zip command provides a verbose output. The command zip -rv archive.zip directory/ will list each file being added, along with the file size and timestamp, and the compression method used.
  5. -d option for dump: The dump command is used for backup and restore. The -d option sets the debugging level, which provides verbose output similar to other commands. A level of 0 is default, while a level of 1 or higher provides progressively more detailed output. For example, dump -0u -f /dev/st0 /home will provide a standard backup, but dump -1u -d1 -f /dev/st0 /home will provide the same backup with verbose output.

In conclusion, these verbosity options are crucial for obtaining detailed information about the archiving or compression process. By using these options, administrators can track the progress and troubleshoot any issues that might arise during the operation.

Linux verbose option

The v option for verbose output is not necessary to create and extract tar archives. However, it is useful as a check to view the set of files acted upon as the archive is generated or extracted. The syntax for the verbose option is the same as that for other tar commands.
The default tape drive under Linux is /dev/st0 (first SCSI tape device name). Following paragraph summaries command you need to use control tape drive for backup/restore purpose.

Linux Tape Backup Example

To backup to multiple tape use the following command (backup /home file system):
# tar -clpMzvf /dev/st0 /home

To compare tape backup, enter:
# tar -dlpMzvf /dev/st0 /home

To restore tape in case of data loss or hard disk failure:
# tar -xlpMzvf /dev/st0 /home