Change intrusive usage of man entities to <command> tags.

This commit is contained in:
Chern Lee 2001-09-07 00:33:25 +00:00
parent c5f66c8cec
commit 4b0a749149
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10610

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/backups/chapter.sgml,v 1.43 2001/09/02 10:56:54 murray Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/backups/chapter.sgml,v 1.44 2001/09/02 11:47:02 murray Exp $
--> -->
<chapter id="backups"> <chapter id="backups">
@ -213,9 +213,9 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<para>Use the front panel button to eject the tape.</para> <para>Use the front panel button to eject the tape.</para>
<para>Re-insert the tape and &man.dump.8; data to the tape.</para> <para>Re-insert the tape and <command>dump</command> data to the tape.</para>
<para>&man.dump.8; will report <literal>DUMP: End of tape <para><command>dump</command> will report <literal>DUMP: End of tape
detected</literal> and the console will show: <literal>HARDWARE detected</literal> and the console will show: <literal>HARDWARE
FAILURE info:280 asc:80,96</literal>.</para> FAILURE info:280 asc:80,96</literal>.</para>
@ -244,23 +244,24 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<indexterm><primary><command>dump</command></primary></indexterm> <indexterm><primary><command>dump</command></primary></indexterm>
<indexterm><primary><command>restore</command></primary></indexterm> <indexterm><primary><command>restore</command></primary></indexterm>
<para>The traditional Unix backup programs are &man.dump.8; and <para>The traditional Unix backup programs are
&man.restore.8;. They operate on the drive as a collection of <command>dump</command> and <command>restore</command>. They
disk blocks, below the abstractions of files, links and operate on the drive as a collection of disk blocks, below the
directories that are created by the filesystems. &man.dump.8; abstractions of files, links and directories that are created by
backs up an entire filesystem on a device. It is unable to the filesystems. <command>dump</command> backs up an entire
backup only part of a filesystem or a directory tree that filesystem on a device. It is unable to backup only part of a
spans more than one filesystem. &man.dump.8; does not write files and filesystem or a directory tree that spans more than one
filesystem. <command>dump</command> does not write files and
directories to tape, but rather writes the raw data blocks that directories to tape, but rather writes the raw data blocks that
comprise files and directories.</para> comprise files and directories.</para>
<note><para>If you use &man.dump.8; on your root directory, you <note><para>If you use <command>dump</command> on your root directory, you
would not back up <filename>/home</filename>, would not back up <filename>/home</filename>,
<filename>/usr</filename> or many other directories since <filename>/usr</filename> or many other directories since
these are typically mount points for other filesystems or these are typically mount points for other filesystems or
symbolic links into those filesystems.</para></note> symbolic links into those filesystems.</para></note>
<para>&man.dump.8; has quirks that remain from its early days in <para><command>dump</command>has quirks that remain from its early days in
Version 6 of AT&amp;T Unix (circa 1975). The default Version 6 of AT&amp;T Unix (circa 1975). The default
parameters are suitable for 9-track tapes (6250 bpi), not the parameters are suitable for 9-track tapes (6250 bpi), not the
high-density media available today (up to 62,182 ftpi). These high-density media available today (up to 62,182 ftpi). These
@ -269,12 +270,12 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<indexterm><primary><filename>rhosts</filename></primary></indexterm> <indexterm><primary><filename>rhosts</filename></primary></indexterm>
<para>It is also possible to backup data across the network to a <para>It is also possible to backup data across the network to a
tape drive attached to another computer with &man.rdump.8; and tape drive attached to another computer with <command>rdump</command> and
&man.rrestore.8;. Both programs rely upon &man.rcmd.3; and <command>rrestore</command>. Both programs rely upon <command>rcmd</command> and
&man.ruserok.3; to access the remote tape drive. Therefore, <command>ruserok</command> to access the remote tape drive. Therefore,
the user performing the backup must have the user performing the backup must have
<literal>rhosts</literal> access to the remote computer. The <literal>rhosts</literal> access to the remote computer. The
arguments to &man.rdump.8; and &man.rrestore.8; must be suitable arguments to <command>rdump</command> and <command>rrestore</command> must be suitable
to use on the remote computer. (e.g. When to use on the remote computer. (e.g. When
<command>rdump</command>ing from a FreeBSD computer to an <command>rdump</command>ing from a FreeBSD computer to an
Exabyte tape drive connected to a Sun called Exabyte tape drive connected to a Sun called
@ -284,9 +285,9 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
allowing <literal>rhosts</literal> commands. Evaluate your allowing <literal>rhosts</literal> commands. Evaluate your
situation carefully.</para> situation carefully.</para>
<para>It is also possible to use &man.rdump.8; and <para>It is also possible to use <command>rdump</command> and
&man.rrestore.8; in a more secure fashion over <command>rrestore</command> in a more secure fashion over
&man.ssh.1;.</para> <command>ssh</command>.</para>
<example> <example>
<title>Using <command>rdump</command> over <application>ssh</application></title> <title>Using <command>rdump</command> over <application>ssh</application></title>
@ -304,27 +305,31 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<secondary><command>tar</command></secondary> <secondary><command>tar</command></secondary>
</indexterm> </indexterm>
<para>&man.tar.1; also dates back to Version 6 of AT&amp;T Unix (circa 1975). <para>&man.tar.1; also dates back to Version 6 of AT&amp;T Unix
&man.tar.1; operates in cooperation with the filesystem; &man.tar.1; (circa 1975). <command>tar</command> operates in cooperation
writes files and directories to tape. &man.tar.1; does not support the with the filesystem; <command>tar</command> writes files and
directories to tape. <command>tar</command> does not support the
full range of options that are available from &man.cpio.1;, but full range of options that are available from &man.cpio.1;, but
&man.tar.1; does not require the unusual command pipeline that <command>tar</command> does not require the unusual command
&man.cpio.1; uses.</para> pipeline that <command>cpio</command> uses.</para>
<indexterm><primary><command>tar</command></primary></indexterm> <indexterm><primary><command>tar</command></primary></indexterm>
<para>Most versions of &man.tar.1; do not support backups across the <para>Most versions of <command>tar</command> do not support
network. The GNU version of &man.tar.1;, which FreeBSD utilizes, backups across the network. The GNU version of
supports remote devices using the same syntax as &man.rdump.8;. To <command>tar</command>, which FreeBSD utilizes, supports remote
&man.tar.1; to an Exabyte tape drive connected to a Sun called devices using the same syntax as <command>rdump</command>. To
<hostid>komodo</hostid>, use: <command>/usr/bin/tar cf <command>tar</command> to an Exabyte tape drive connected to a
komodo:/dev/nrsa8 . 2>&amp;1</command>. For versions without remote Sun called <hostid>komodo</hostid>, use: <command>/usr/bin/tar
device support, you can use a pipeline and &man.rsh.1; to send the cf komodo:/dev/nrsa8 . 2>&amp;1</command>. For versions without
data to a remote tape drive.</para> remote device support, you can use a pipeline and
<command>rsh</command> to send the data to a remote tape
drive.</para>
<screen>&prompt.root; <userinput>tar cf - . | rsh <replaceable>hostname</replaceable> dd of=<replaceable>tape-device</replaceable> obs=20b</userinput></screen> <screen>&prompt.root; <userinput>tar cf - . | rsh <replaceable>hostname</replaceable> dd of=<replaceable>tape-device</replaceable> obs=20b</userinput></screen>
<para>If you are worried about the security of backing up over a network <para>If you are worried about the security of backing up over a
you should use the &man.ssh.1; command instead of &man.rsh.1;.</para> network you should use the <command>ssh</command> command
instead of <command>rsh</command>.</para>
</sect2> </sect2>
<sect2> <sect2>
@ -334,18 +339,19 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<secondary><command>cpio</command></secondary> <secondary><command>cpio</command></secondary>
</indexterm> </indexterm>
<para>&man.cpio.1; is the original Unix file interchange tape program <para>&man.cpio.1; is the original Unix file interchange tape
for magnetic media. &man.cpio.1; has options (among many others) to program for magnetic media. <command>cpio</command> has options
perform byte-swapping, write a number of different archive formats, (among many others) to perform byte-swapping, write a number of
and pipe the data to other programs. This last feature makes different archive formats, and pipe the data to other programs.
&man.cpio.1; and excellent choice for installation media. This last feature makes <command>cpio</command> and excellent
&man.cpio.1; does not know how to walk the directory tree and a list choice for installation media. <command>cpio</command> does not
of files must be provided through <filename>stdin</filename>.</para> know how to walk the directory tree and a list of files must be
<indexterm><primary><command>cpio</command></primary></indexterm> provided through <filename>stdin</filename>.</para>
<indexterm><primary><command>cpio</command></primary></indexterm>
<para>&man.cpio.1; does not support backups across the network. You can <para><command>cpio</command> does not support backups across
use a pipeline and &man.rsh.1; to send the data to a remote tape the network. You can use a pipeline and <command>rsh</command>
drive.</para> to send the data to a remote tape drive.</para>
<screen>&prompt.root; <userinput>for f in <replaceable>directory_list; do</replaceable></userinput> <screen>&prompt.root; <userinput>for f in <replaceable>directory_list; do</replaceable></userinput>
<userinput>find $f >> backup.list</userinput> <userinput>find $f >> backup.list</userinput>
@ -370,14 +376,17 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<indexterm><primary>POSIX</primary></indexterm> <indexterm><primary>POSIX</primary></indexterm>
<indexterm><primary>IEEE</primary></indexterm> <indexterm><primary>IEEE</primary></indexterm>
<para>&man.pax.1; is IEEE/POSIX's answer to &man.tar.1; and <para>&man.pax.1; is IEEE/POSIX's answer to
&man.cpio.1;. Over the years the various versions of &man.tar.1; <command>tar</command> and <command>cpio</command>. Over the
and &man.cpio.1; have gotten slightly incompatible. So rather than years the various versions of <command>tar</command> and
fight it out to fully standardize them, POSIX created a new archive <command>cpio</command> have gotten slightly incompatible. So
utility. &man.pax.1; attempts to read and write many of the various rather than fight it out to fully standardize them, POSIX
&man.cpio.1; and &man.tar.1; formats, plus new formats of its own. created a new archive utility. <command>pax</command> attempts
Its command set more resembles &man.cpio.1; than &man.tar.1;.</para> to read and write many of the various <command>cpio</command>
</sect2> and <command>tar</command> formats, plus new formats of its own.
Its command set more resembles <command>cpio</command> than
<command>tar</command>.</para>
</sect2>
<sect2 id="backups-programs-amanda"> <sect2 id="backups-programs-amanda">
<title><application>Amanda</application></title> <title><application>Amanda</application></title>
@ -443,7 +452,7 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<para>&man.dump.8; <emphasis>Period.</emphasis> Elizabeth D. Zwicky <para>&man.dump.8; <emphasis>Period.</emphasis> Elizabeth D. Zwicky
torture tested all the backup programs discussed here. The clear torture tested all the backup programs discussed here. The clear
choice for preserving all your data and all the peculiarities of Unix choice for preserving all your data and all the peculiarities of Unix
filesystems is &man.dump.8;. Elizabeth created filesystems containing filesystems is <command>dump</command>. Elizabeth created filesystems containing
a large variety of unusual conditions (and some not so unusual ones) a large variety of unusual conditions (and some not so unusual ones)
and tested each program by doing a backup and restore of those and tested each program by doing a backup and restore of those
filesystems. The peculiarities included: files with holes, files with filesystems. The peculiarities included: files with holes, files with
@ -485,11 +494,11 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<para>Otherwise, you have to create two custom bootable <para>Otherwise, you have to create two custom bootable
floppies which have a kernel that can mount all of your disks floppies which have a kernel that can mount all of your disks
and access your tape drive. These floppies must contain: and access your tape drive. These floppies must contain:
&man.fdisk.8;, &man.disklabel.8;, &man.newfs.8;, <command>fdisk</command>, <command>disklabel</command>,
&man.mount.8;, and whichever backup program you use. These <command>newfs</command>, <command>mount</command>, and
programs must be statically linked. If you use whichever backup program you use. These programs must be
&man.dump.8;, the floppy must contain statically linked. If you use <command>dump</command>, the
&man.restore.8;.</para> floppy must contain <command>restore</command>.</para>
<para>Third, create backup tapes regularly. Any changes that you make <para>Third, create backup tapes regularly. Any changes that you make
after your last backup may be irretrievably lost. Write-protect the after your last backup may be irretrievably lost. Write-protect the
@ -709,11 +718,11 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
<indexterm> <indexterm>
<primary><command>newfs</command></primary> <primary><command>newfs</command></primary>
</indexterm> </indexterm>
<para>Try to &man.mount.8; (e.g. <command>mount /dev/da0a <para>Try to <command>mount</command> (e.g. <command>mount /dev/da0a
/mnt</command>) the root partition of your first disk. If the /mnt</command>) the root partition of your first disk. If the
disklabel was damaged, use &man.disklabel.8; to re-partition and disklabel was damaged, use <command>disklabel</command> to re-partition and
label the disk to match the label that you printed and saved. Use label the disk to match the label that you printed and saved. Use
&man.newfs.8; to re-create the filesystems. Re-mount the root <command>newfs</command> to re-create the filesystems. Re-mount the root
partition of the floppy read-write (<command>mount -u -o rw partition of the floppy read-write (<command>mount -u -o rw
/mnt</command>). Use your backup program and backup tapes to /mnt</command>). Use your backup program and backup tapes to
recover the data for this filesystem (e.g. <command>restore vrf recover the data for this filesystem (e.g. <command>restore vrf
@ -779,16 +788,17 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
<title>So How Do I Backup My Data to Floppies?</title> <title>So How Do I Backup My Data to Floppies?</title>
<para>The best way to backup to floppy disk is to use <para>The best way to backup to floppy disk is to use
&man.tar.1; with the <option>-M</option> (multi volume) option, which <command>tar</command> with the <option>-M</option> (multi
allows backups to span multiple floppies.</para> volume) option, which allows backups to span multiple
floppies.</para>
<para>To backup all the files in the current directory and sub-directory <para>To backup all the files in the current directory and sub-directory
use this (as root):</para> use this (as root):</para>
<screen>&prompt.root; <userinput>tar Mcvf /dev/fd0 *</userinput></screen> <screen>&prompt.root; <userinput>tar Mcvf /dev/fd0 *</userinput></screen>
<para>When the first floppy is full &man.tar.1; will prompt you to <para>When the first floppy is full <command>tar</command> will prompt you to
insert the next volume (because &man.tar.1; is media independent it insert the next volume (because <command>tar</command> is media independent it
refers to volumes. In this context it means floppy disk)</para> refers to volumes. In this context it means floppy disk)</para>
<screen>Prepare volume #2 for /dev/fd0 and hit return:</screen> <screen>Prepare volume #2 for /dev/fd0 and hit return:</screen>
@ -807,10 +817,11 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
</indexterm> </indexterm>
<indexterm><primary>compression</primary></indexterm> <indexterm><primary>compression</primary></indexterm>
<para>Unfortunately, &man.tar.1; will not allow the <para>Unfortunately, <command>tar</command> will not allow the
<option>-z</option> option to be used for multi-volume archives. <option>-z</option> option to be used for multi-volume archives.
You could, of course, &man.gzip.1; all the files, &man.tar.1; them to You could, of course, <command>gzip</command> all the files,
the floppies, then &man.gunzip.1; the files again!</para> <command>tar</command> them to the floppies, then
<command>gunzip</command> the files again!</para>
</sect2> </sect2>
<sect2 id="floppies-restoring"> <sect2 id="floppies-restoring">
@ -826,14 +837,14 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
<screen>&prompt.root; <userinput>tar Mxvf /dev/fd0 <replaceable>filename</replaceable></userinput></screen> <screen>&prompt.root; <userinput>tar Mxvf /dev/fd0 <replaceable>filename</replaceable></userinput></screen>
<para>&man.tar.1; will prompt you to insert subsequent floppies until it <para><command>tar</command> will prompt you to insert subsequent floppies until it
finds the required file.</para> finds the required file.</para>
<para>Alternatively, if you know which floppy the file is on then you <para>Alternatively, if you know which floppy the file is on then you
can simply insert that floppy and use the same command as above. Note can simply insert that floppy and use the same command as above. Note
that if the first file on the floppy is a continuation from the that if the first file on the floppy is a continuation from the
previous one then &man.tar.1; will warn you that it cannot restore it, previous one then <command>tar</command> will warn you that it cannot
even if you have not asked it to!</para> restore it, even if you have not asked it to!</para>
</sect2> </sect2>
</sect1> </sect1>
</chapter> </chapter>