0% found this document useful (0 votes)
126 views

Backup Restore Using Cpio Command

The document discusses using the cpio command to backup and restore files. Cpio can backup individual files or entire directory structures, preserving file attributes and hard links. It outputs a list of files piped from find to a tape device. The tape can then be restored using cpio by piping the contents back from the tape into the command.

Uploaded by

Sopan sonar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views

Backup Restore Using Cpio Command

The document discusses using the cpio command to backup and restore files. Cpio can backup individual files or entire directory structures, preserving file attributes and hard links. It outputs a list of files piped from find to a tape device. The tape can then be restored using cpio by piping the contents back from the tape into the command.

Uploaded by

Sopan sonar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Backup restore using cpio command

cpio features
1. Used for single or multiple files backup .
2. Can backup special character & block device files .
3. Works only on mounted file system.
4. Need a list of files to be backed up .
5. Preserve hard links and time stamps of the files .

Using cpio command to back up all the files in current directory to


tape.
find . -depth -print | cpio -ovcB > /dev/rmt/0
cpio expects a list of files and find command provides the list, cpio has to put these file on some
destination and a > sign redirect these files to tape. This can be a file as well .

Viewing cpio files on a tape


cpio -ivtB < /dev/rmt/0

Restoring a cpio backup


cpio -ivcB < /dev/rmt/0

You might also like