Copying Files and File Systems to Tape
The pax, tar, and cpio commands can be
used to copy files and file systems to tape. The command you choose depends on how much flexibility and
precision you require for the copy. Because all three commands use the raw device, you do not need to
format or make a file system on tapes before you use them.
Table 37-3 Advantages and Disadvantages of
cpio,
pax, and
tar Commands
Command
|
Function
|
Advantages
|
Disadvantages
|
pax
|
Copy files, special files, or file systems that require multiple tape volumes or when you want to copy
files to and from POSIX-compliant systems
|
|
See disadvantages for tar command except, that pax can create multiple tape volumes
|
tar
|
Copy files and directory subtrees to a single tape
|
|
-
Is not aware of file system boundaries
-
Full pathname length cannot exceed 255 characters
-
Does not copy empty directories or special files such as device files
-
Cannot be used to create multiple tape volumes
|
cpio
|
Copy files, special files, or file systems that require multiple
tape volumes or when you want to copy files from SunOS 5.x systems to SunOS 4.x systems
|
-
Packs data onto tape more efficiently than tar
-
Skips over any bad spots in a tape when restoring.
-
Provides options for writing files with different header formats (tar, ustar, crc, odc, bar) for portability between different system types
-
Creates multiple tape volumes
| |
The tape drive and device name you use depend on the hardware and configuration for each system.
See "Choosing Which Media to Use" for more information about tape drives and device names.