SlideShare a Scribd company logo
COMPRESSION, SYSTEM
BACKUP & RESTORE
Objectives
 Outline the features of common
compression utilities
 Compress and decompress files using
common compression utilities
 Perform system backups using the tar,
cpio, and dump commands
 View and extract archives using the
tar, cpio, and restore commands
2
Compression
 Compression: process in which files are
reduced in size by stripping out
characters
 Compression algorithm: standard set of
instructions used to compress a file
 Compression ratio: percentage by which
the file size was decreased
 Common compression utilities include
compress, gzip, and bzip2
3
The compress Utility
 Use to compress files using the Adaptive
Lempel Ziv coding (LZW) compression
algorithm
 Average compression ratio of 40-50%
 compress command: used to compress files
 zcat command: used to display the contents
of an archive created with compress
 Can use zmore and zless commands to view
contents page-by-page
 uncompress command: used to decompress
files compressed by compress command
4
The gzip Utility
 GNU zip (gzip): used to compress files
using the Lempel-Ziv compression
algorithm (LZ77)
 Varies slightly from algorithm used by
compress
 Average compression ratio of 60-70%
 Uses .gz filename extension by default
 gunzip command: used to decompress
.gz files
5
The bzip2 Utility
 bzip2 command: used to compress files
using Burrows-Wheeler Block Sorting
Huffman Coding compression algorithm
 Cannot compress directory full of files
 Cannot use zcat and zmore to view files
○ Must use bzcat command
 Compression ratio is 50% to 75% on average
 Uses .bz2 filename extension by default
 bunzip2 command: used to decompress
files compressed via bzip2
6
System Backup
 System backup: process whereby files are
copied to an archive
 Archive: location (file or device) that
contains copy of files
 Typically created by a backup utility
 Should backup user files from home
directories and any important system
configuration files
 Possibly files used by system services as well
 Several backup utilities available
 tar, cpio, dump/restore, burning software
Linux+ Guide to Linux Certification, 3e 7
System Backup (continued)
Linux+ Guide to Linux Certification, 3e 8
Table 11-4: Common tape device files
The tar Utility
 Tape archive (tar) utility: one of oldest
and most common backup utilities
 Can create archive in a file on a filesystem
or directly on a device
 tar command: activates tar utility
 Arguments list the files to place in the
archive
 Accepts options to determine location of
archive and action to perform on archive
Linux+ Guide to Linux Certification, 3e 9
The tar Utility (continued)
Linux+ Guide to Linux Certification, 3e 10
-x Extract Archive
-c Create New Archive
-r Append to Archive
-v verbose
-f Write/Read File
-t List Archive Contents
-z Compress using gzip (c mode only)
The tar Utility (continued)
 tar utility does not compress files inside
archive
 Time needed to transfer archive across a
network is high
 Can compress archive
 Backing up files to compressed archive on
a filesystem is useful when transferring
data across a network
 Use options of the tar command to compress
an archive immediately after creation
Linux+ Guide to Linux Certification, 3e 11
The cpio Utility
 Copy in/out (cpio): common backup
utility
 Activated by the cpio command
○ Has various options
 Includes options similar to tar utility
 Has added features
○ Ability to back up device files
○ Long filenames
 Uses absolute pathnames by default when
archiving
Linux+ Guide to Linux Certification, 3e 12
The dump/restore Utility
 dump/restore: Used to back up files and
directories to device or file on filesystem
 Works only with files on ext2 and ext3
filesystems
 Designed to backup entire filesystems to
an archive
 /etc/dumpdates: file used to store
information about incremental and full
backups
Linux+ Guide to Linux Certification, 3e 13
The dump/restore Utility
(continued)
 Full backup: archiving all data on
filesystem
 Incremental backup: backs up only data
that has changed since last backup
 Can perform up to nine different incremental
backups
 dump command: create archives for full
or incremental backup
 restore command: extract archives
created with dump
Linux+ Guide to Linux Certification, 3e 14
Summary
 Many compression utilities are available for
Linux systems; each uses a different
compression algorithm and produces a
different compression ratio
 Files can be backed up to an archive using
a
backup utility
 To back up files to CD-RW or DVD-RW, use
burning software instead of a backup utility
Linux+ Guide to Linux Certification, 3e 15
Summary (continued)
 tar is the most common backup utility
used today
 Typically used to create compressed
archives called tarballs
Linux+ Guide to Linux Certification, 3e 16

More Related Content

PPT
Compression Commands in Linux
PDF
Object Detection and Recognition
PPT
Z buffer
PPTX
Loops in flow
PDF
COLOR CRT MONITORS IN COMPUTER GRAPHICS
PPTX
The analysis synthesis model of compilation
PPT
Chapter 21 - The Linux System
PPTX
Graphics pipeline and rendering
Compression Commands in Linux
Object Detection and Recognition
Z buffer
Loops in flow
COLOR CRT MONITORS IN COMPUTER GRAPHICS
The analysis synthesis model of compilation
Chapter 21 - The Linux System
Graphics pipeline and rendering

What's hot (20)

PPT
Computer animation
PPTX
Stressen's matrix multiplication
PDF
Animation ppt
PPTX
Hit and-miss transform
PDF
Android intents
PPTX
Selection sorting
PPTX
Application of image processing
PPT
4 informed-search
PPT
Nfa vs dfa
PPTX
Bruteforce algorithm
PPTX
Prefix, Infix and Post-fix Notations
PPTX
Noise filtering
PPTX
Histogram Specification or Matching Problem
PPTX
Church Turing Thesis
PPTX
Window to Viewport Transformation in Computer Graphics with.pptx
PPTX
Knowledge representation in AI
PPT
Informed search (heuristics)
PPTX
Chapter 9 morphological image processing
PDF
Memory management
Computer animation
Stressen's matrix multiplication
Animation ppt
Hit and-miss transform
Android intents
Selection sorting
Application of image processing
4 informed-search
Nfa vs dfa
Bruteforce algorithm
Prefix, Infix and Post-fix Notations
Noise filtering
Histogram Specification or Matching Problem
Church Turing Thesis
Window to Viewport Transformation in Computer Graphics with.pptx
Knowledge representation in AI
Informed search (heuristics)
Chapter 9 morphological image processing
Memory management
Ad

Similar to Compression (20)

PPT
Backup and recovery
PPTX
Linux Presentation
PPTX
RHEL Log-files, RPM, Backup & Recovery
PPT
Linux filesystemhierarchy
PPTX
Linux basics part 1
DOC
PDF
Managing your data - Introduction to Linux for bioinformatics
PPSX
Management file and directory in linux
PPTX
Software management in linux
PPTX
Linux 4 you
PDF
Lesson 2 Understanding Linux File System
PPT
101 4.1 create partitions and filesystems
PPT
How ubuntu works???
PPTX
linuxtl04.pptx
PDF
Linux Getting Started
PPT
Tutorial 2
PPT
101 apend. backups
PPT
8.1.intro unix
PPT
Backup and recovery
Linux Presentation
RHEL Log-files, RPM, Backup & Recovery
Linux filesystemhierarchy
Linux basics part 1
Managing your data - Introduction to Linux for bioinformatics
Management file and directory in linux
Software management in linux
Linux 4 you
Lesson 2 Understanding Linux File System
101 4.1 create partitions and filesystems
How ubuntu works???
linuxtl04.pptx
Linux Getting Started
Tutorial 2
101 apend. backups
8.1.intro unix
Ad

Recently uploaded (20)

PPTX
Cell Types and Its function , kingdom of life
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
master seminar digital applications in india
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Complications of Minimal Access Surgery at WLH
Cell Types and Its function , kingdom of life
human mycosis Human fungal infections are called human mycosis..pptx
Renaissance Architecture: A Journey from Faith to Humanism
Sports Quiz easy sports quiz sports quiz
master seminar digital applications in india
PPH.pptx obstetrics and gynecology in nursing
01-Introduction-to-Information-Management.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Final Presentation General Medicine 03-08-2024.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
O7-L3 Supply Chain Operations - ICLT Program
Anesthesia in Laparoscopic Surgery in India
O5-L3 Freight Transport Ops (International) V1.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
GDM (1) (1).pptx small presentation for students
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Complications of Minimal Access Surgery at WLH

Compression

  • 2. Objectives  Outline the features of common compression utilities  Compress and decompress files using common compression utilities  Perform system backups using the tar, cpio, and dump commands  View and extract archives using the tar, cpio, and restore commands 2
  • 3. Compression  Compression: process in which files are reduced in size by stripping out characters  Compression algorithm: standard set of instructions used to compress a file  Compression ratio: percentage by which the file size was decreased  Common compression utilities include compress, gzip, and bzip2 3
  • 4. The compress Utility  Use to compress files using the Adaptive Lempel Ziv coding (LZW) compression algorithm  Average compression ratio of 40-50%  compress command: used to compress files  zcat command: used to display the contents of an archive created with compress  Can use zmore and zless commands to view contents page-by-page  uncompress command: used to decompress files compressed by compress command 4
  • 5. The gzip Utility  GNU zip (gzip): used to compress files using the Lempel-Ziv compression algorithm (LZ77)  Varies slightly from algorithm used by compress  Average compression ratio of 60-70%  Uses .gz filename extension by default  gunzip command: used to decompress .gz files 5
  • 6. The bzip2 Utility  bzip2 command: used to compress files using Burrows-Wheeler Block Sorting Huffman Coding compression algorithm  Cannot compress directory full of files  Cannot use zcat and zmore to view files ○ Must use bzcat command  Compression ratio is 50% to 75% on average  Uses .bz2 filename extension by default  bunzip2 command: used to decompress files compressed via bzip2 6
  • 7. System Backup  System backup: process whereby files are copied to an archive  Archive: location (file or device) that contains copy of files  Typically created by a backup utility  Should backup user files from home directories and any important system configuration files  Possibly files used by system services as well  Several backup utilities available  tar, cpio, dump/restore, burning software Linux+ Guide to Linux Certification, 3e 7
  • 8. System Backup (continued) Linux+ Guide to Linux Certification, 3e 8 Table 11-4: Common tape device files
  • 9. The tar Utility  Tape archive (tar) utility: one of oldest and most common backup utilities  Can create archive in a file on a filesystem or directly on a device  tar command: activates tar utility  Arguments list the files to place in the archive  Accepts options to determine location of archive and action to perform on archive Linux+ Guide to Linux Certification, 3e 9
  • 10. The tar Utility (continued) Linux+ Guide to Linux Certification, 3e 10 -x Extract Archive -c Create New Archive -r Append to Archive -v verbose -f Write/Read File -t List Archive Contents -z Compress using gzip (c mode only)
  • 11. The tar Utility (continued)  tar utility does not compress files inside archive  Time needed to transfer archive across a network is high  Can compress archive  Backing up files to compressed archive on a filesystem is useful when transferring data across a network  Use options of the tar command to compress an archive immediately after creation Linux+ Guide to Linux Certification, 3e 11
  • 12. The cpio Utility  Copy in/out (cpio): common backup utility  Activated by the cpio command ○ Has various options  Includes options similar to tar utility  Has added features ○ Ability to back up device files ○ Long filenames  Uses absolute pathnames by default when archiving Linux+ Guide to Linux Certification, 3e 12
  • 13. The dump/restore Utility  dump/restore: Used to back up files and directories to device or file on filesystem  Works only with files on ext2 and ext3 filesystems  Designed to backup entire filesystems to an archive  /etc/dumpdates: file used to store information about incremental and full backups Linux+ Guide to Linux Certification, 3e 13
  • 14. The dump/restore Utility (continued)  Full backup: archiving all data on filesystem  Incremental backup: backs up only data that has changed since last backup  Can perform up to nine different incremental backups  dump command: create archives for full or incremental backup  restore command: extract archives created with dump Linux+ Guide to Linux Certification, 3e 14
  • 15. Summary  Many compression utilities are available for Linux systems; each uses a different compression algorithm and produces a different compression ratio  Files can be backed up to an archive using a backup utility  To back up files to CD-RW or DVD-RW, use burning software instead of a backup utility Linux+ Guide to Linux Certification, 3e 15
  • 16. Summary (continued)  tar is the most common backup utility used today  Typically used to create compressed archives called tarballs Linux+ Guide to Linux Certification, 3e 16