Change intrusive usage of man entities to <command> tags.
This commit is contained in:
parent
c5f66c8cec
commit
4b0a749149
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10610
1 changed files with 84 additions and 73 deletions
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -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>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
|
||||
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>restore</command></primary></indexterm>
|
||||
|
||||
<para>The traditional Unix backup programs are &man.dump.8; and
|
||||
&man.restore.8;. They operate on the drive as a collection of
|
||||
disk blocks, below the abstractions of files, links and
|
||||
directories that are created by the filesystems. &man.dump.8;
|
||||
backs up an entire filesystem on a device. It is unable to
|
||||
backup only part of a filesystem or a directory tree that
|
||||
spans more than one filesystem. &man.dump.8; does not write files and
|
||||
<para>The traditional Unix backup programs are
|
||||
<command>dump</command> and <command>restore</command>. They
|
||||
operate on the drive as a collection of disk blocks, below the
|
||||
abstractions of files, links and directories that are created by
|
||||
the filesystems. <command>dump</command> backs up an entire
|
||||
filesystem on a device. It is unable to backup only part of a
|
||||
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
|
||||
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>,
|
||||
<filename>/usr</filename> or many other directories since
|
||||
these are typically mount points for other filesystems or
|
||||
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&T Unix (circa 1975). The default
|
||||
parameters are suitable for 9-track tapes (6250 bpi), not the
|
||||
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>
|
||||
<para>It is also possible to backup data across the network to a
|
||||
tape drive attached to another computer with &man.rdump.8; and
|
||||
&man.rrestore.8;. Both programs rely upon &man.rcmd.3; and
|
||||
&man.ruserok.3; to access the remote tape drive. Therefore,
|
||||
tape drive attached to another computer with <command>rdump</command> and
|
||||
<command>rrestore</command>. Both programs rely upon <command>rcmd</command> and
|
||||
<command>ruserok</command> to access the remote tape drive. Therefore,
|
||||
the user performing the backup must have
|
||||
<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
|
||||
<command>rdump</command>ing from a FreeBSD computer to an
|
||||
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
|
||||
situation carefully.</para>
|
||||
|
||||
<para>It is also possible to use &man.rdump.8; and
|
||||
&man.rrestore.8; in a more secure fashion over
|
||||
&man.ssh.1;.</para>
|
||||
<para>It is also possible to use <command>rdump</command> and
|
||||
<command>rrestore</command> in a more secure fashion over
|
||||
<command>ssh</command>.</para>
|
||||
|
||||
<example>
|
||||
<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>
|
||||
</indexterm>
|
||||
|
||||
<para>&man.tar.1; also dates back to Version 6 of AT&T Unix (circa 1975).
|
||||
&man.tar.1; operates in cooperation with the filesystem; &man.tar.1;
|
||||
writes files and directories to tape. &man.tar.1; does not support the
|
||||
<para>&man.tar.1; also dates back to Version 6 of AT&T Unix
|
||||
(circa 1975). <command>tar</command> operates in cooperation
|
||||
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
|
||||
&man.tar.1; does not require the unusual command pipeline that
|
||||
&man.cpio.1; uses.</para>
|
||||
<command>tar</command> does not require the unusual command
|
||||
pipeline that <command>cpio</command> uses.</para>
|
||||
|
||||
<indexterm><primary><command>tar</command></primary></indexterm>
|
||||
<para>Most versions of &man.tar.1; do not support backups across the
|
||||
network. The GNU version of &man.tar.1;, which FreeBSD utilizes,
|
||||
supports remote devices using the same syntax as &man.rdump.8;. To
|
||||
&man.tar.1; to an Exabyte tape drive connected to a Sun called
|
||||
<hostid>komodo</hostid>, use: <command>/usr/bin/tar cf
|
||||
komodo:/dev/nrsa8 . 2>&1</command>. For versions without remote
|
||||
device support, you can use a pipeline and &man.rsh.1; to send the
|
||||
data to a remote tape drive.</para>
|
||||
<indexterm><primary><command>tar</command></primary></indexterm>
|
||||
<para>Most versions of <command>tar</command> do not support
|
||||
backups across the network. The GNU version of
|
||||
<command>tar</command>, which FreeBSD utilizes, supports remote
|
||||
devices using the same syntax as <command>rdump</command>. To
|
||||
<command>tar</command> to an Exabyte tape drive connected to a
|
||||
Sun called <hostid>komodo</hostid>, use: <command>/usr/bin/tar
|
||||
cf komodo:/dev/nrsa8 . 2>&1</command>. For versions without
|
||||
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>
|
||||
|
||||
<para>If you are worried about the security of backing up over a network
|
||||
you should use the &man.ssh.1; command instead of &man.rsh.1;.</para>
|
||||
<para>If you are worried about the security of backing up over a
|
||||
network you should use the <command>ssh</command> command
|
||||
instead of <command>rsh</command>.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -334,18 +339,19 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
|
|||
<secondary><command>cpio</command></secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>&man.cpio.1; is the original Unix file interchange tape program
|
||||
for magnetic media. &man.cpio.1; has options (among many others) to
|
||||
perform byte-swapping, write a number of different archive formats,
|
||||
and pipe the data to other programs. This last feature makes
|
||||
&man.cpio.1; and excellent choice for installation media.
|
||||
&man.cpio.1; does not know how to walk the directory tree and a list
|
||||
of files must be provided through <filename>stdin</filename>.</para>
|
||||
<indexterm><primary><command>cpio</command></primary></indexterm>
|
||||
<para>&man.cpio.1; is the original Unix file interchange tape
|
||||
program for magnetic media. <command>cpio</command> has options
|
||||
(among many others) to perform byte-swapping, write a number of
|
||||
different archive formats, and pipe the data to other programs.
|
||||
This last feature makes <command>cpio</command> and excellent
|
||||
choice for installation media. <command>cpio</command> does not
|
||||
know how to walk the directory tree and a list of files must be
|
||||
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
|
||||
use a pipeline and &man.rsh.1; to send the data to a remote tape
|
||||
drive.</para>
|
||||
<para><command>cpio</command> does not support backups across
|
||||
the network. You can use a pipeline and <command>rsh</command>
|
||||
to send the data to a remote tape drive.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>for f in <replaceable>directory_list; do</replaceable></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>IEEE</primary></indexterm>
|
||||
|
||||
<para>&man.pax.1; is IEEE/POSIX's answer to &man.tar.1; and
|
||||
&man.cpio.1;. Over the years the various versions of &man.tar.1;
|
||||
and &man.cpio.1; have gotten slightly incompatible. So rather than
|
||||
fight it out to fully standardize them, POSIX created a new archive
|
||||
utility. &man.pax.1; attempts to read and write many of the various
|
||||
&man.cpio.1; and &man.tar.1; formats, plus new formats of its own.
|
||||
Its command set more resembles &man.cpio.1; than &man.tar.1;.</para>
|
||||
</sect2>
|
||||
<para>&man.pax.1; is IEEE/POSIX's answer to
|
||||
<command>tar</command> and <command>cpio</command>. Over the
|
||||
years the various versions of <command>tar</command> and
|
||||
<command>cpio</command> have gotten slightly incompatible. So
|
||||
rather than fight it out to fully standardize them, POSIX
|
||||
created a new archive utility. <command>pax</command> attempts
|
||||
to read and write many of the various <command>cpio</command>
|
||||
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">
|
||||
<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
|
||||
torture tested all the backup programs discussed here. The clear
|
||||
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)
|
||||
and tested each program by doing a backup and restore of those
|
||||
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
|
||||
floppies which have a kernel that can mount all of your disks
|
||||
and access your tape drive. These floppies must contain:
|
||||
&man.fdisk.8;, &man.disklabel.8;, &man.newfs.8;,
|
||||
&man.mount.8;, and whichever backup program you use. These
|
||||
programs must be statically linked. If you use
|
||||
&man.dump.8;, the floppy must contain
|
||||
&man.restore.8;.</para>
|
||||
<command>fdisk</command>, <command>disklabel</command>,
|
||||
<command>newfs</command>, <command>mount</command>, and
|
||||
whichever backup program you use. These programs must be
|
||||
statically linked. If you use <command>dump</command>, the
|
||||
floppy must contain <command>restore</command>.</para>
|
||||
|
||||
<para>Third, create backup tapes regularly. Any changes that you make
|
||||
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>
|
||||
<primary><command>newfs</command></primary>
|
||||
</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
|
||||
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
|
||||
&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
|
||||
/mnt</command>). Use your backup program and backup tapes to
|
||||
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>
|
||||
|
||||
<para>The best way to backup to floppy disk is to use
|
||||
&man.tar.1; with the <option>-M</option> (multi volume) option, which
|
||||
allows backups to span multiple floppies.</para>
|
||||
<command>tar</command> with the <option>-M</option> (multi
|
||||
volume) option, which allows backups to span multiple
|
||||
floppies.</para>
|
||||
|
||||
<para>To backup all the files in the current directory and sub-directory
|
||||
use this (as root):</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>tar Mcvf /dev/fd0 *</userinput></screen>
|
||||
|
||||
<para>When the first floppy is full &man.tar.1; will prompt you to
|
||||
insert the next volume (because &man.tar.1; is media independent it
|
||||
<para>When the first floppy is full <command>tar</command> will prompt you to
|
||||
insert the next volume (because <command>tar</command> is media independent it
|
||||
refers to volumes. In this context it means floppy disk)</para>
|
||||
|
||||
<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><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.
|
||||
You could, of course, &man.gzip.1; all the files, &man.tar.1; them to
|
||||
the floppies, then &man.gunzip.1; the files again!</para>
|
||||
You could, of course, <command>gzip</command> all the files,
|
||||
<command>tar</command> them to the floppies, then
|
||||
<command>gunzip</command> the files again!</para>
|
||||
</sect2>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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
|
||||
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,
|
||||
even if you have not asked it to!</para>
|
||||
previous one then <command>tar</command> will warn you that it cannot
|
||||
restore it, even if you have not asked it to!</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
|
Loading…
Reference in a new issue