Module 12
Module 12
Module 12
Module 12
Introduction Backup is usually done by first collecting all the data in a single archive file, which can be compressed using the compression tools. Topic Storing files to Media
system administrator.
Computers have the major advantage of storing the data, which makes
it significant.
Backups are important because of the possibility of loss of data. The possibility of data loss can be by: File system corruption Accidental removal of files Hardware failures System crash
Contd
tar options
tar cvf (creating the tar file)
tar tvf (listing the contents of tar file) tar xvf (extracting the contents of tar file)
where,
Contd
Contd
Contd
Contd
The restore command is used to view and restore the dump file. Syntax: # restore - <options> <file name> Example: restore if mydumps
where,
Contd
The cpio command is a tool for creating and extracting archives, or copying files from one place to another, which contains other files and information about them, such as their file name, owner, timestamps, and access permissions.
It handles a number of cpio formats as well as reading and writing tar files. The archive can be another file on the disk, a magnetic tape, or a pipe.
Contd
Contd
Example:
cat file1_back.cpio | cpio idvm where,
Contd
Zip zip is a compression and file packaging utility. The program is useful for packaging a set of files for distribution, archiving files and saving disk space by temporarily compressing unused files or directories. The zip program puts one or more compressed files into a single zip archive, along with information about the files. An entire directory structure can be packed into a zip archive with a single command. Syntax zip <new file> <source file> Example: zip install install.log
Contd
Contd
Contd
Lab Exercise
Backup any desired directory using tar command
Compress the file mydata from the data directory and uncompress into