📄 ch67.htm
字号:
takes you to the main menu, shown previously in Figure 67.2. If you want to use your
Lone-Tar system in command mode, use the command</P>
<PRE><FONT COLOR="#0066FF">lone-tar
</FONT></PRE>
<P>followed by any options, or by itself to display the help screen shown earlier
in Figure 67.1.<BR>
<BR>
<A NAME="Heading11<A HREF="../art/67/67lnx03.jpg"><FONT COLOR="#000077">FIGURE
67.3.</FONT></A><FONT COLOR="#000077"><I> </I></FONT><I>If Lone-Tar was installed
correctly, you should see this welcome screen when you start the menu mode.</I>
<H3 ALIGN="CENTER"><A NAME="Heading12<FONT COLOR="#000077">Backing Up with
Lone-Tar</FONT></H3>
<H3 ALIGN="CENTER"><FONT COLOR="#000077"></FONT></H3>
<P>Backups are a vital part of any Linux system, whether you use your system for
serious work or just for playing. The reason is simple: Reloading your Linux system,
reconfiguring it the way it was, and reloading all your applications can take a long
time and can sometimes lead to errors. Recovering from a backup tape or other backup
device can take a few minutes and requires little intervention on your part. If you
have important information stored on your Linux system, you really should have regular
backups made for safety's sake, because it's often impossible to reconstruct data
you lost.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading13<FONT COLOR="#000077"><B>NOTE:</B> </FONT>If you are forced
to use floppies for your backups, you should use the Floppy choice from the main
Lone-Tar menu. This option leads to the Floppy menu, which lets you back up and restore
using your floppy drives rather than a tape drive.
<HR>
</DL>
<P>Lone-Tar lets you make two kinds of backups: Masters and Incrementals. The Master
backup is a complete backup of your system, with every file on the file systems backed
up safely. An Incremental backup is made between Masters and holds the changes to
the system since the last Master. Incremental mode lets you make backups much quicker,
because there is no need to back up every file. Linux knows which files have changed
because of the attributes attached to each file, and the files that have been created
or modified since the last Master backup are written to the backup medium. In case
of a problem and a reload, the Master is reloaded first, and then the Incrementals
made since the Master. If you've lost a file or two, you can often get them from
the Incremental itself.</P>
<P>The manner in which you create Master and Incremental backups will depend on how
much you use your system, how much data you change daily, and how important your
system is to you. For example, a regularly used system could get a Master backup
once a week to a high-capacity drive. Incrementals could be performed automatically
each night.</P>
<P>If you don't use your system much, you can do Master backups once a month and
Incrementals weekly, although this isn't really recommended. For heavily loaded systems,
you might want to forget about Incrementals altogether and make a new Master backup
every night. One of Lone-Tar's strengths is the capability to automate backups, as
you will see.</P>
<P>To start a Master backup, choose the <TT>M</TT> option from the main menu. You
are asked whether you want to exclude any file systems, as shown in Figure 67.4.
By default, Lone-Tar assumes that it will back up everything on your system, but
you might want to prevent Lone-Tar from backing up some file systems or directories,
such as a mounted CD-ROM. If you have a CD-ROM mounted under <TT>/cdrom</TT>, for
example, you could use this option to tell Lone-Tar to ignore that directory (after
all, there's little point in backing up a CD-ROM). You might also want to avoid backing
up mounted network drives, if you have any.<BR>
<BR>
<A NAME="Heading14<A HREF="../art/67/67lnx04.jpg"><FONT COLOR="#000077">FIGURE
67.4.</FONT></A><FONT COLOR="#000077"> </FONT><I>When creating a Master backup, Lone-Tar
lets you exclude directories that are not to be backed up.</I></P>
<P>You are then prompted to install a tape (or other backup medium, depending on
the backup device you specified during installation), and the backup process is started.
You see a few lines telling you that Lone-Tar is waiting to check the tape (in this
case). After that, Lone-Tar checks the tape (or other medium) to make sure that it
is ready.</P>
<P>Lone-Tar likes to initialize each backup device itself and mark the tape or drive
with a file identifying the backup as a Lone-Tar product. You don't have to mark
such backups, but they do help Lone-Tar in the restoration process. An error message,
such as the one shown in Figure 67.5, shows that Lone-Tar has determined that either
no tape is in the tape drive or a brand- new tape has been loaded. Instructions are
provided for marking the tape with the Lone-Tar file, but you don't have to do this
to perform a backup. Simply pressing Enter starts the backup process. Figure 67.6
shows the backup process underway. Lone-Tar echoes the name of each file and its
details to you while it is backing up the system. This display lets you see that
Lone-Tar is working properly.<BR>
<BR>
<A NAME="Heading15<A HREF="../art/67/67lnx05.jpg"><FONT COLOR="#000077">FIGURE
67.5.</FONT></A><FONT COLOR="#000077"> </FONT><I>Lone-Tar issues warnings if it detects
no tape in the backup drive, or if the tape is new and unmarked by Lone-Tar.</I><BR>
<BR>
<A NAME="Heading16<A HREF="../art/67/67lnx06.jpg"><FONT COLOR="#000077">FIGURE
67.6.</FONT></A><FONT COLOR="#000077"> </FONT><I>During the backup process, Lone-Tar
shows you the filename and the file's details as it works.</I></P>
<P>If one backup medium is not enough for the Master backup, Lone-Tar prompts you
to change the medium. Lone-Tar waits until you press Enter before continuing. After
the Master backup is completed, Lone-Tar returns to the main menu.</P>
<P>Lone-Tar can use compression when making backups to fit more information on a
tape or removable medium. The choice of using compression is up to you, and you will
probably be asked whether you want to use it during the installation process. The
advantage of compression is simple: more data in less space. The disadvantages are
twofold: It takes slightly longer to make backups when using compression, and the
compressed backup can be read only by Lone-Tar. A noncompressed backup can be read
by tar or Lone-Tar, which is a great advantage if you are moving your backup media
to another machine.</P>
<P>The amount of time required to make a backup depends on various factors, especially
the size of the file system, the speed of your backup system, and the load on your
system. If you have a fast system and a high-capacity fast backup device, Lone-Tar
can back up your system much faster than tar itself would have. The speed is most
limited, however, by the backup devices themselves. A DAT SCSI drive, for example,
is much faster than a QIC cartridge tape drive driven off the floppy. You will get
used to the amount of time required for a Master backup after a couple of backup
cycles. If a long time is required, start scheduling the backups at night while you
sleep, or when you go away for a length of time. Take note that most Master backups
take at least an hour, and often many hours, depending on the backup drives.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading17<FONT COLOR="#000077"><B>NOTE: </B></FONT>Be sure to label
the tape or other medium with the date and type of backup. Write clearly! You never
know when you'll have to figure out which tape was made when.
<HR>
</DL>
<P>To make an Incremental backup, you follow the same process. Because most Incremental
backups are much smaller than a Master backup, they also back up much faster. You
really should get in the habit of making Incremental backups either every day you
use the Linux system or whenever you save something you really can't afford to lose.
It's better to spend 10 minutes making a backup than four hours re-creating that
chapter of your latest book!</P>
<P>A selective backup, started using the <TT>S</TT> option on the Lone-Tar menu,
lets you back up only specific areas of your system. You are asked which files or
directories to include or exclude, and then the backup proceeds normally.
<H3 ALIGN="CENTER"><A NAME="Heading18<FONT COLOR="#000077">Verifying Files</FONT></H3>
<P>The Verify option provided by Lone-Tar is a security precaution that you should
use every time you make a backup. The Verify option scans the backup and compares
it to the original files. This action ensures that any backup errors are caught before
they become serious. It is a good habit to verify each backup after it has been made.
This is especially true when you have made new Master backups.</P>
<P>Remember that some files on your system might change between the backup time and
the verification time, depending on whether the system was used between the two times.
Some automated procedures, such as mail, logging, news, and automated background
tasks, alter files while a backup or verification is proceeding. Lone-Tar finds the
files different and reports errors to you. You should carefully read the reports
from the verification process so that you know which errors are important and which
are due to these system changes.
<H3 ALIGN="CENTER"><A NAME="Heading19<FONT COLOR="#000077">Restoring Files</FONT></H3>
<P>When you have to restore a file, a directory, or an entire file system, find the
proper backups. If you have been using the Master and Incremental routine, you need
the last Master and all the Incrementals since that Master was made. Alternatively,
if you are just looking for a few files you accidentally deleted, you might know
which tape or drive they are on and can use just that medium.</P>
<P>To start a restore process, select the <TT>R</TT> option from the Lone-Tar main
menu. This brings up the Restore menu, shown in Figure 67.7. Most of the options
on the Restore menu are self-explanatory. For example, to restore an entire tape,
you would use the option Restore entire tape to hard disk.
<H6></H6>
<P><A NAME="Heading20<A HREF="../art/67/67lnx07.jpg"><FONT COLOR="#000077">FIGURE
67.7.</FONT></A><FONT COLOR="#000077"> </FONT><I>The Lone-Tar Restore menu.</I></P>
<P>Some of the other options on the Restore menu allow you to selectively restore
directories or files, based on exact names or wildcards. You can also build a list
of files or directories and have them all restored at the same time. Alternatively,
you can decide which files or directories are not to be restored, create an exclusion
list of them, and then restore everything else.</P>
<P>After you have decided which files or directories to restore, Lone-Tar asks you
to insert the tape and then starts the restoration process. As with a backup, Lone-Tar
echoes everything it does to the screen so that you can see what it is doing.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading21<FONT COLOR="#000077"><B>NOTE:</B> </FONT>When performing
a restore of a few files or directories, Lone-Tar has to search through the tape
or medium to find those files. This can be a slow process, depending on the speed
of the backup device, so don't worry if you don't see anything happening for a few
minutes. You should see the status lights on your backup device blinking to show
that the device is being used by Lone-Tar.
<HR>
</DL>
<P>If more than one tape or other device is involved in the backup, Lone-Tar prompts
you to insert the next volume. It keeps doing so until the restore process is complete.</P>
<P>If you are restoring from a combination of Masters and Incrementals, you must
repeat the restore process for each tape. For example, if you accidentally erased
an entire directory, you could use the last Master backup to get the main files,
and then go through all the Incrementals made since the Master was created to obtain
any changes. You have to perform the updates manually using the Restore menu.</P>
<P>After the restoration is completed, Lone-Tar returns to the main menu. You should
verify that the backup was to the proper location and that everything looks correct.</P>
<P>Tape-Tell is a special feature of Lone-Tar that tells you a little about when
the tape was used. This information hinges on the Lone-Tar file that can be put at
the beginning of the medium. We discussed this file earlier, in the section "Backing
Up with Lone-Tar."
<H3 ALIGN="CENTER"><A NAME="Heading22<FONT COLOR="#000077">Utilities and Environment:
Tweaking Lone-Tar</FONT></H3>
<P>The Lone-Tar Utilities menu, shown in Figure 67.8, holds several useful commands
and functions. Most of these options are self-explanatory, and a few are very handy
for users. It is helpful to check the backup date of the last Master backup occasionally
as a reminder of when you should start thinking about a new Master backup.</P>
<P>The automated use of Lone-Tar through cron is a neat feature that lets your system
make backups without your being there. As you know from earlier chapters in this
book, cron lets you schedule commands to be run at particular times or intervals,
so you can easily set Lone-Tar to be run by cron to create Incremental backups every
night, twice a week, or whenever you want. You don't need to know details about cron
to schedule backups--Lone-Tar takes care of that for you.</P>
<P>The Utilities menu also lets you change the backup device type and details, so
if you have more than one backup system on your Linux system, you can change between
them. This capability is useful if you want to make Master backups to a high-capacity
device but Incrementals to a different device.<BR>
<BR>
<A NAME="Heading23<A HREF="../art/67/67lnx08.jpg"><FONT COLOR="#000077">FIGURE
67.8.</FONT></A><FONT COLOR="#000077"> </FONT><I>The Lone-Tar Utilities menu.</I></P>
<P>The Environment menu, shown in Figure 67.9, lists all the settings Lone-Tar works
with. Many of these were set when you installed Lone-Tar, but you can modify them
as needed to customize your installation.
<H6></H6>
<P><A NAME="Heading24<A HREF="../art/67/67lnx09.jpg"><FONT COLOR="#000077">FIGURE
67.9.</FONT></A><FONT COLOR="#000077"> </FONT><I>The Lone-Tar Environment menu lets
you alter the behavior of the backup tool.</I>
<H3 ALIGN="CENTER"><A NAME="Heading25<FONT COLOR="#000077">Summary</FONT></H3>
<H3 ALIGN="CENTER"><FONT COLOR="#000077"></FONT></H3>
<P>Lone-Tar has many features that weren't mentioned in this chapter, but you can
read the online documentation to find out more about the system. Using Lone-Tar for
your backup and restore operations is fast and easy, and you'll find yourself performing
them a lot more when you don't have to fumble with awkward syntax or worry about
mistyping a command. You should try out the Lone-Tar demo provided on the CD-ROM.
You'll find it very easy to work with.
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -