Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
25
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

Chapter 3: Read This Before You Break Something Else! (Backup and Recovery)

Overview

Computers fail on many levels, and hardware, software, users, and sysadmins all can damage a system. As such, you should always be ready for the worst; in our case, that means being able to back up and restore your hard drives.

Because FreeBSD is a continually evolving system, you will inevitably need to upgrade and patch your system from time to time, and any time you do so, there's a chance you'll damage the operating environment. If that happens, you'll need to recover or rebuild your system. (Just think of how many times you've patched a Microsoft server system and found something behaving oddly afterwards.) On any computer, even small configuration changes can potentially damage data.

Worse still, if you're reading this book, you're probably just learning how to configure your FreeBSD system and you're probably not well prepared for disaster. As a new user, you'll need to test a variety of configurations and review the "history" of how your system has been configured. And, if you learn that some obscure but important system function has been broken for months, you will need to look up the changes you've made in order to go back and fix it. Will you really remember what a particular file looked like weeks or months ago? In fact, if you're experimenting hard enough, you may even utterly destroy your system, so you'll need a way to recover your important data.

This chapter begins with the large−scale approach: backing up the entire computer. However, this approach won't work well if you only want to back up individual files, so we'll go on to look at ways to handle those. If a file can change three times a day, and you take weekly backups, you can lose valuable information if you rely on your weekly backups. Finally, should you encounter a partial disaster, we'll consider ways to recover and rebuild using single−user mode and the fixit disk.

System Backups

You only need a system backup if you care about your data. The question for you to answer is "how much would it cost to replace my data?" A low−end SCSI tape backup system, for example, can run several hundred dollars. IDE systems are less expensive than SCSI, but slower, hold much less data, and are less well supported.

The questions to ask yourself when choosing a backup solution are how much your time is worth and how long it would take to restore your system from the install media. If the most important data on your hard disk is your Web browser's bookmarks file, it might not be worth investing in a backup system. But if your server is your company's backbone, or part of it, you'll want to take this investment very seriously.

A complete backup and restore operation requires a tape drive and tape backups. You can also back up to files, across the network, or to removable media such as CD−ROMs or floppy disk. Since we're discussing network servers, however, I'll focus on production−grade solutions.

48