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 46-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 multi-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 multi-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.8 systems to SunOS 4.0/4.1 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 multi-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.