prevent writing over or deleting anything in it. Incorrectly changing a
configuration file and not saving the original in case it has to be restored
(which happens more often than not because the person reconfigured it
incorrectly) is another common error.
TIP
To make a backup of a configuration file you are about to edit, use the cp
command:
Click here to view code image
matthew@seymour:~$ cp filename filename.original
To restore it, use the following:
Click here to view code image
matthew@seymour:~$ cp filename.original filename
Never edit or move the *.original file, or the original copy will be
lost. You can change the file’s mode to be unwritable; then if you try to
delete it, you are prevented from doing so and receive a warning.
Proper backups can help you recover from these problems with a minimum of
hassle, but you have to put in the effort to keep backups current, verify that
they are intact, and practice restoring the data in different disaster scenarios.
Assessing Your Backup Needs and Resources
By now you have realized that some kind of plan is needed to safeguard your
data, and, like most others, you may be overwhelmed by the prospect. Entire
books, as well as countless articles and white papers, have been written on the
subject of backing up and restoring data. What makes the topic so complex is
that each solution is truly individual. However, the proper approach to making
the decision is very straightforward. You start the process by answering two
questions:
What data must be safeguarded?
How often does the data change?
The answers to these two questions help you determine how important the
data is, understand the volume of the data, and determine the frequency of the
backups. This information, in turn, helps you choose the backup medium.
Only then can you select the software to accommodate all these
considerations. (You learn about choosing backup software, hardware, and
media later in this chapter.)