Commands for Copying File Systems
When you want to copy or move individual files, portions of file systems,
or complete file systems, you can use the procedures described in this chapter.
The following table describes various backup and restore commands that
are available in the Oracle Solaris release. For enterprise environments,
consider using a enterprise-level backup product. Information about enterprise-level
backup products is available on the Oracle Technical Network.
Table 4-1 Summary of Various Backup
Commands | | | |
volcopy
| Yes
| Yes
| Physical
|
tar
| No
| No
| Logical
|
cpio
| No
| Yes
| Logical
|
pax
| Yes
| Yes
| Logical
|
dd
| Yes
| No
| Physical
|
zfs send and zfs receive
| Yes
| N/A
| Logical
|
zfs snapshot
| Yes
| N/A
| Logical
|
|
The following table describes the advantages and disadvantages of some
of these commands.
Table 4-2 Advantages and Disadvantages of tar, pax, and cpio Commands | | | |
tar
| Use to copy files and directory subtrees to a single tape.
|
| Is not aware of file system boundaries
Length of full path name cannot exceed 255 characters
Cannot be used to create multiple tape volumes
|
pax
| Use to copy files, special files, or file systems that require multiple
tape volumes. Or, use when you want to copy files to and from POSIX-compliant
systems.
|
| Same disadvantages as the tar command, except that
the pax command can create multiple tape volumes.
|
cpio
| Use to copy files, special files, or file systems that require multiple
tape volumes. Or, use when you want to copy files from systems running current
Oracle Solaris releases systems to systems running older Solaris releases.
| Packs data onto tape more efficiently than the tar command
Skips over any bad spots in a tape when restoring
Provides options for writing files with different header formats,
such as ( tar, ustar, crc, odc, bar), for portability between different
system types
Creates multiple tape volumes
| The command syntax is more difficult than the tar or pax commands.
|
|
The following sections describes step-by-step instructions and examples
of how to use these commands.