📄 ch67.htm
字号:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<font face="Arial,Helvetica" size="-1" color="#006666">
<b>Linux</b></font><p>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<UL>
<LI><A HREF="#Heading1">- 67 -</A>
<UL>
<LI><A HREF="#Heading2">Cactus/Lone Star Utilities</A>
<UL>
<LI><A HREF="#Heading3">What Is Lone-Tar?</A>
<LI><A HREF="#Heading4">NOTE</A>
<LI><A HREF="#Heading5">Using Lone-Tars Interface</A>
<UL>
<LI><A HREF="#Heading6">FIGURE 67.1.</A>
<LI><A HREF="#Heading7">FIGURE 67.2.</A>
</UL>
<LI><A HREF="#Heading8">Installing Lone-Tar</A>
<LI><A HREF="#Heading9">NOTE</A>
<LI><A HREF="#Heading10">NOTE</A>
<UL>
<LI><A HREF="#Heading11">FIGURE 67.3.</A>
</UL>
<LI><A HREF="#Heading12">Backing Up with Lone-Tar</A>
<LI><A HREF="#Heading13">NOTE</A>
<UL>
<LI><A HREF="#Heading14">FIGURE 67.4.</A>
<LI><A HREF="#Heading15">FIGURE 67.5.</A>
<LI><A HREF="#Heading16">FIGURE 67.6.</A>
</UL>
<LI><A HREF="#Heading17">NOTE</A>
<LI><A HREF="#Heading18">Verifying Files</A>
<LI><A HREF="#Heading19">Restoring Files</A>
<UL>
<LI><A HREF="#Heading20">FIGURE 67.7.</A>
</UL>
<LI><A HREF="#Heading21">NOTE</A>
<LI><A HREF="#Heading22">Utilities and Environment: Tweaking Lone-Tar</A>
<UL>
<LI><A HREF="#Heading23">FIGURE 67.8.</A>
<LI><A HREF="#Heading24">FIGURE 67.9.</A>
</UL>
<LI><A HREF="#Heading25">Summary</A>
</UL>
</UL>
</UL>
<P>
<HR SIZE="4">
<H2 ALIGN="CENTER"><A NAME="Heading1<FONT COLOR="#000077">- 67 -</FONT></H2>
<H2 ALIGN="CENTER"><A NAME="Heading2<FONT COLOR="#000077">Cactus/Lone Star
Utilities</FONT></H2>
<P><I>by Tim Parker</I></P>
<P>IN THIS CHAPTER</P>
<UL>
<LI>What Is Lone-Tar?
<P>
<LI>Using Lone-Tar's Interface
<P>
<LI>Installing Lone-Tar
<P>
<LI>Backing Up with Lone-Tar
<P>
<LI>Verifying Files
<P>
<LI>Restoring Files
<P>
<LI>Utilities and Environment: Tweaking Lone-Tar
</UL>
<P><BR>
As you saw in Chapter 38, "System Administration Basics," making backups
on your Linux system can be a complex and often annoying procedure, especially if
you don't have a high-capacity tape drive or other backup storage device. If you
have to rely on floppies for a backup, you are really in for a frustrating time,
because a full backup can take dozens (if not hundreds) of disks. When floppies are
all that's available, most users don't even bother.</P>
<P>Many users find the normal backup utility tar difficult and unfriendly to work
with. On top of that, tar can error out for any number of conditions, causing you
to have to restart your backup from the beginning. In many larger UNIX environments,
the use of tar has been replaced by custom-designed GUI-driven backup utilities,
but Linux hasn't quite caught up to that point yet. There are, however, a few alternatives
to using straightforward tar, and the best of these is Lone Star Software's Lone-Tar.
An evaluation copy of Lone-Tar has been graciously provided by Lone Star Software
on the CD-ROM accompanying this book. It's definitely worth trying out!
<H3 ALIGN="CENTER"><A NAME="Heading3<FONT COLOR="#000077">What Is Lone-Tar?</FONT></H3>
<P>Lone-Tar can best be thought of as a super version of tar. It provides all the
features of tar yet adds some functionality that tar lacks. To be very safe, Lone-Tar
does not use the standard tar utility, although its behavior is similar. Lone-Tar
is available for many UNIX and non-UNIX platforms and is compatible across them all.
You could, for example, use a DOS version of Lone-Tar to back up files to a tape,
and then read them into your Linux system.</P>
<P>Like tar, Lone-Tar can back up and restore entire file systems to and from disks,
tape, auxiliary hard disks, and other storage media. Lone-Tar goes beyond normal
tar in that all special files, links (symbolic and otherwise), virtual files, and
partitions can be handled as easily as standard files.</P>
<P>Lone-Tar can also allow backups and restores of dual drives with different capacities,
which tar is not easily capable of doing. Most important, Lone-Tar has an excellent
error-recovery procedure built in that allows recovery of a file system or files
on a backup medium, even when that medium has developed errors. When tar encounters
problems with a backup medium, it terminates, effectively ruining the value of that
backup set.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading4<FONT COLOR="#000077"><B>NOTE: </B></FONT>Lone-Tar sounds
pretty handy so far, doesn't it? I've used Lone-Tar for years on my UNIX systems,
and the availability of a Linux version makes it almost a necessary part of every
Linux installation I set up. Lone-Tar is a commercial product. Lone Star Software
expects to be paid for Lone-Tar, but you can use the free version on the CD-ROM at
the back of this book for up to a year without worrying. After that trial period,
you can purchase a license for Lone-Tar if you find it valuable and useful. Along
with the commercial version, you'll also get a well-written manual. For more information
on Lone-Tar, contact Lone Star Software at 13987 W. Annapolis Court, Mt. Airy, MD
21771; by telephone at (800) LONE-TAR; or by Internet at <TT>cowboy@cactus.com</TT>,
<TT>http://www.cactus.com</TT>, or <TT>ftp.cactus.com</TT>.
<HR>
</DL>
<H3 ALIGN="CENTER"><A NAME="Heading5<FONT COLOR="#000077">Using Lone-Tars Interface</FONT></H3>
<P>Lone-Tar has two interfaces: menu-driven and command line. The command-line interface
is very similar to the tar command's syntax for compatibility's sake. This way, someone
who has been using tar for many years and moves to Lone-Tar for the extra capabilities
it offers doesn't have to relearn a whole new command set. As you might have discovered
by now, tar's command set is rather uninspiring, awkward, and difficult to master.</P>
<P>It does take years of use to feel comfortable with tar's command line, so for
that reason Lone Star Software designed a friendlier menu-driven interface too. You
can use either the command line or the menu-driven interface to perform all of Lone-Tar's
functions, and they work the same. The menu-driven interface is much easier to work
with, though, especially if you haven't mastered tar.</P>
<P>You can see the difference between the two interface methods by a quick look at
the syntax of Lone-Tar. The syntax, very similar to tar's syntax, looks like this:</P>
<PRE><FONT COLOR="#0066FF">lone-tar [MIcCrtTUxPZ] [bdefhklmnpvFEADVR] [tapefile] [block size]
 [compression limit] [0-9] [floppy/tape size] files ...
</FONT></PRE>
<P>If you are not exactly right with one of the command-line parameters, both tar
and Lone-Tar give you pages of error codes and options. You can display the command-line
help screen, shown in Figure 67.1, at any time by simply typing</P>
<PRE><FONT COLOR="#0066FF">lone-tar
</FONT></PRE>
<P>at the command line.</P>
<P>The menu-driven interface, on the other hand, shown in Figure 67.2, is much more
friendly and easier to figure out. Each of the primary menu options leads to another
menu, with mnemonic startup commands for each choice.</P>
<P>The choice of interface you use is up to you, of course, but if you are not familiar
with tar's awkward syntax, you should stick to the menu-driven interface. UNIX veterans
might want to stay with the command-line interface, but the menu-driven system is
much easier to work with and eliminates the chance of typing errors. For most of
this chapter, we'll work with the menu-driven interface.</P>
<P><BR>
<A NAME="Heading6<A HREF="../art/67/67lnx01.jpg"><FONT COLOR="#000077">FIGURE
67.1.</FONT></A><FONT COLOR="#000077"> </FONT><I>The first page of command-line help
from Lone-Tar.</I><BR>
<BR>
<A NAME="Heading7<A HREF="../art/67/67lnx02.jpg"><FONT COLOR="#000077">FIGURE
67.2.</FONT></A><FONT COLOR="#000077"> </FONT><I>The menu-driven interface from Lone-Tar
is much easier and friendlier to use than the command line.</I>
<H3 ALIGN="CENTER"><A NAME="Heading8<FONT COLOR="#000077">Installing Lone-Tar</FONT></H3>
<H3 ALIGN="CENTER"><FONT COLOR="#000077"></FONT></H3>
<P>The installation process for Lone-Tar is pretty simple. You need to log in as
root, and then change to the <TT>/tmp</TT> directory. You then should extract all
the files from the CD-ROM or disk (if you have put the Lone-Tar software on the disk)
with a <TT>tar</TT> command. For example, if you have copied the Lone-Tar files to
a floppy in drive A, you would log into the system as root and issue the following
two commands:</P>
<PRE><FONT COLOR="#0066FF">cd /tmp
tar xvf /dev/rfd0
</FONT></PRE>
<P>The <TT>tar</TT> command tells Linux to extract all the files from the first floppy
drive (<TT>/dev/rfd0</TT>) and store them in the current directory.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading9<FONT COLOR="#000077"><B>NOTE: </B></FONT>Some Linux systems
don't address the first floppy as <TT>/dev/rfd0</TT> but prefer <TT>/dev/fd0</TT>.
If you get a message about "device unknown" when you use the command line
shown previously, use <TT>/dev/fd0</TT> as the floppy device name instead.
<HR>
</DL>
<P>If you are installing from CD-ROM, you can copy the files to the <TT>/tmp</TT>
directory directly using <TT>cp</TT>. For example, if the files are stored on the
CD-ROM in the directory <TT>/lone-tar</TT> and the CD-ROM is mounted to your Linux
system in the directory <TT>/cdrom</TT>, you would issue these commands:</P>
<PRE><FONT COLOR="#0066FF">cd /tmp
cp /cdrom/lone-tar/*
</FONT></PRE>
<P>The exact command line you use depends on the location of the Lone-Tar files on
the CD-ROM and the mount location on your system.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading10<FONT COLOR="#000077"><B>NOTE: </B></FONT>For more information
on mounting the CD-ROM on your Linux system, see Chapter 38 or the installation chapters.
<HR>
</DL>
<P>After the files are all safely in the <TT>/tmp</TT> directory, you can start the
installation process by issuing this command:</P>
<PRE><FONT COLOR="#0066FF">./init.ltar
</FONT></PRE>
<P>This program was written by Lone Star Software to install all the components of
Lone-Tar properly. You are asked a bunch of questions about your tape or backup drive,
its capacity, and whether you want to print the online manuals. If you don't want
to print the manuals during the installation process, you can print them at any time
from the Lone-Tar menu.</P>
<P>To start the Lone-Tar system in menu-driven mode, issue the following command:</P>
<PRE><FONT COLOR="#0066FF">ltmenu
</FONT></PRE>
<P>You should then see a screen like the one shown in Figure 67.3. Pressing Enter
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -