Summary of "SA Lab Exp 8 Part 2"
File Management and Backup in Unix-like Systems
This segment explains commands and methodologies related to file management and backup, focusing primarily on the cpi command and the dump/restore commands.
Scientific Concepts and Discoveries Presented
File Merging and Extraction Using the cpi Command
- CPI stands for Copy Copy Out.
- It is used to merge multiple files into a single archive (e.g., tar file) or extract files from such archives.
cpioperates in three modes:- Input mode (
-I): Merges files into an archive. - Output mode (
-O): Extracts files from an archive. - Pass mode (
-P): Copies files from one directory to another without archiving.
- Input mode (
- File lists for archiving or copying are created using the
findcommand. - Proper use of input/output redirection and pipe symbols is necessary.
- The
-Hoption specifies the archive format (e.g., TAP, ZIP).
Backup and Restoration Using dump and restore Commands
dumpbacks up entire file systems.restorerecovers files from backups created bydump.- Two types of backups:
- Full backup (level 0): Backs up all files.
- Incremental backup (levels 1-9): Backs up only files changed since the last backup.
- Backups are recorded sequentially as records, historically stored on tape files.
- Important
dumpcommand options:-0for full backup.-Fto specify the file name to dump to.-uto update the backup record.-bto specify block size.--listto list file systems available for backup.--estimateto estimate the space required for backup.
- Incremental backups save time and space by only backing up changes since the last full or incremental backup.
- Multiple directories can be backed up in one command.
Methodology Outline for Using cpi and dump Commands
Using cpi
- Create a list of files to be archived using the
findcommand. - Use
cpi -Iwith the file list to merge files into an archive. - Use
cpi -Owith redirection to extract files from an archive. - Use
cpi -Pto copy files from one directory to another. - Use the
-Hoption to specify the archive format if needed.
Using dump and restore
- Use
dump -0for a full backup of a file system. - Use
dump -n(wheren > 0) for incremental backups. - Specify the backup file name with
-F. - Optionally specify block size with
-b. - Use
restoreto recover files from backup archives. - Use
dump --listto view file systems. - Use
dump --estimateto check space requirements before backup.
Researchers or Sources Featured
No researchers or sources are explicitly mentioned. The content appears to be a tutorial or lab demonstration on Unix/Linux commands.
Category
Science and Nature