Exp No 7
Exp No 7
AIM
Demonstrate backup and recovery management using commands tar, cpio, dump
Commands
1) tar
The `tar` command in Linux is used to create, manipulate, or extract archive files in the tar format,
which is a commonly used archive format in Unix-like operating systems.
a. Create an archive:
b. Extract an archive:
It's a versatile tool for archiving and managing files in the Linux environment.
2) cpio
The cpio command in Linux is used to create, extract, and manipulate archives of files. It can
work in conjunction with other commands like find or ls to back up or restore files, transfer data,
or create archives in different formats (including backups). Unlike tar, which is more widely used
for archiving, cpio is more flexible when working with other commands to manage file streams.
Syntax
cpio [options] [< archive >]
Options:
• -o: Create an archive (copy-out mode).
• -v: Verbose mode (lists the files being archived).
• -O [file]: Directs the output to the specified file (e.g., -O archive.cpio).
Options:
• -i: Extract files from an archive (copy-in mode).
• -d: Create directories as needed when extracting.
• -v: Verbose mode (lists the files being extracted).
• -t: List the contents of the archive without extracting.
3) dump
The dump command in Linux is used for backing up file systems to a storage device. It is a low-
level backup tool that copies entire filesystems, rather than individual files. It is often used to create
full or incremental backups of a filesystem.