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

What's hot

Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
Nishant Munjal
 
Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)
Jaime Barragan
 
Linux file system
Linux file systemLinux file system
Linux file system
Midaga Mengistu
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Manav Prasad
 
Apache web server
Apache web serverApache web server
Apache web server
Sabiha M
 
OpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf TutorialOpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf Tutorial
Saju Madhavan
 
VI editor in unix
VI editor in unix VI editor in unix
VI editor in unix
Ahmed Fayyaz
 
How to start Django automatically after restarting development or local syste...
How to start Django automatically after restarting development or local syste...How to start Django automatically after restarting development or local syste...
How to start Django automatically after restarting development or local syste...
Vidhi_Khatri
 
Data Encryption Standard
Data Encryption StandardData Encryption Standard
Data Encryption Standard
JeevananthamArumugam
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming Language
Ahmad Idrees
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
Papu Kumar
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development Training
Stephan Cadene
 
Github
GithubGithub
Github
MeetPatel710
 
Logical Volume Manager. An Introduction
Logical Volume Manager. An IntroductionLogical Volume Manager. An Introduction
Logical Volume Manager. An Introduction
Juan A. Suárez Romero
 
Introduction to Linux Kernel
Introduction to Linux KernelIntroduction to Linux Kernel
Introduction to Linux Kernel
Stryker King
 
Vi editor
Vi editorVi editor
Vi editor
Ramakrishna kapa
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
Emertxe Information Technologies Pvt Ltd
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
Keith Wright
 
Learning sed and awk
Learning sed and awkLearning sed and awk
Learning sed and awk
Yogesh Sawant
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
Wave Digitech
 

What's hot (20)

Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Apache web server
Apache web serverApache web server
Apache web server
 
OpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf TutorialOpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf Tutorial
 
VI editor in unix
VI editor in unix VI editor in unix
VI editor in unix
 
How to start Django automatically after restarting development or local syste...
How to start Django automatically after restarting development or local syste...How to start Django automatically after restarting development or local syste...
How to start Django automatically after restarting development or local syste...
 
Data Encryption Standard
Data Encryption StandardData Encryption Standard
Data Encryption Standard
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming Language
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development Training
 
Github
GithubGithub
Github
 
Logical Volume Manager. An Introduction
Logical Volume Manager. An IntroductionLogical Volume Manager. An Introduction
Logical Volume Manager. An Introduction
 
Introduction to Linux Kernel
Introduction to Linux KernelIntroduction to Linux Kernel
Introduction to Linux Kernel
 
Vi editor
Vi editorVi editor
Vi editor
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Learning sed and awk
Learning sed and awkLearning sed and awk
Learning sed and awk
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 

Similar to Compression

Backup and recovery
Backup and recoveryBackup and recovery
Backup and recovery
duraimurugan89
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
Muhammad Qazi
 
RHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryRHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & Recovery
Aneesa Rahman
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
Dr. C.V. Suresh Babu
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
Lilesh Pathe
 
Linux
LinuxLinux
Managing your data - Introduction to Linux for bioinformatics
Managing your data - Introduction to Linux for bioinformaticsManaging your data - Introduction to Linux for bioinformatics
Managing your data - Introduction to Linux for bioinformatics
BITS
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linux
Zkre Saleh
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
nejadmand
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
Shashwat Shriparv
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
Sadia Bashir
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
Acácio Oliveira
 
How ubuntu works???
How ubuntu works???How ubuntu works???
How ubuntu works???
Nirma University
 
linuxtl04.pptx
linuxtl04.pptxlinuxtl04.pptx
linuxtl04.pptx
Shinwa Hasan
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
Angus Li
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
tech2click
 
101 apend. backups
101 apend. backups101 apend. backups
101 apend. backups
Acácio Oliveira
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
 
test
testtest
Linux
Linux Linux

Similar to Compression (20)

Backup and recovery
Backup and recoveryBackup and recovery
Backup and recovery
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
RHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryRHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & Recovery
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
 
Linux
LinuxLinux
Linux
 
Managing your data - Introduction to Linux for bioinformatics
Managing your data - Introduction to Linux for bioinformaticsManaging your data - Introduction to Linux for bioinformatics
Managing your data - Introduction to Linux for bioinformatics
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linux
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
 
How ubuntu works???
How ubuntu works???How ubuntu works???
How ubuntu works???
 
linuxtl04.pptx
linuxtl04.pptxlinuxtl04.pptx
linuxtl04.pptx
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 
101 apend. backups
101 apend. backups101 apend. backups
101 apend. backups
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
test
testtest
test
 
Linux
Linux Linux
Linux
 

Recently uploaded

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 

Recently uploaded (20)

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 

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