, Trevor Kay Linux Certification Bible 

[ Pobierz całość w formacie PDF ]
.Companies spend hundredsof thousands of dollars on their network infrastructure, yet they never take intoaccount the amount of money that may be wasted due to lost data and downtimebecause of a deficient backup plan.The importance of having a proper backup sys-tem that is routinely monitored and tested can t be understated.It s not enough just to back up your user data; critical Linux system files must alsobe backed up on a regular basis.In the event of system file corruption or disk fail-ure, you will be able to quickly restore your system to its original state if you haveregularly backed up system files.You should also regularly test your restore procedures.Many companies only testtheir backup procedures and never test their restores.This is a big mistake becausethe only way you can verify that a backup system is working properly is to test therestore procedure.This chapter deals with planning, executing, and routinely testing a backup andrestore system.Disaster Recovery PlanningIn planning a system for backup and recovery, the Linux system administrator mustanalyze several factors:&' Types of backup data: What different types of data must be backed up, andwhat is their importance?&' Frequency and scheduling: When and how to backup data?&' Storage and media type: What types of storage units and media are available?&' Recovery options: Is this regular user data, or special proprietary databaseinformation?&' Media Storage: Should backup media be stored onsite or offsite? What extrasafety precautions or facilities will be needed?Types of dataBasically, two types of data must be backed up  user files and system files.User filesYour Linux user files are typically stored in the /home partition or directory.Keepall user data in its own partition, so it won t affect critical system partitions.Forexample, your user directories will quickly use up disk space because they continu-ously add files, programs, data, and personal software.If the /home partition runs 214881-6 ch15.F 11/12/01 8:31 AM Page 460Part V &' Maintaining the Linux System460out of space, it won t affect any of the system drives.If your system runs out of diskspace, it may create a condition in which the server can crash.Keeping all user files in the /home partition also aids your backup strategy by havingall your user files backed up in one location.This means you won t have to search allover your file systems for user files that need to be backed up, thus saving the admin-istrator the task of creating lengthy backup scripts to accommodate all locations.Some user data, however, may not be located in the /home partition; for example,special databases that all users can access.You must ensure that these are alsobacked up properly.Many databases store their information in a proprietary formatthat may involve special software or procedures to properly back up the data.Fortransactional databases, for example, you must back up both the database data andthe transaction logs in order to recover from a disaster.System filesLinux system files are critical programs and the data that they contain are necessaryin order for the system to run properly.These critical programs include the coreoperating system, configuration files, and user-installed programs.In the event of a severe system crash, you can install the base operating systemby using the installation disks or CD-ROM.You can also reinstall patches and pro-grams.However, some files can t be reinstalled in this manner, such as specialconfiguration files, user mail, and log files.Back up these files because they can tbe reinstalled by default.Some of the major Linux system partitions and directories include:&' /etc: Configurations for your services, programs, and daemons reside here.This partition is critical when restoring a system to its previous state.&' /usr/local or /opt: Most user-installed files are kept in these partitions anddirectories.&' /var/spool/mail: User mail that has not been downloaded resides here.&' /var/log: This directory contains all your log files.It is a good idea to backupup your system log files on a frequent basis, as they contain information thatcan help you troubleshoot your system.Frequency and SchedulingAfter you know exactly what to back up, you must create a schedule to determinethe frequency for performing backups.Certain data, such as Linux system files,change rarely and can be safely backed up once a week, or whenever an importantconfiguration change takes place.User files that change very frequently should bebacked up daily  at the very least.Some heavily used transactional database envi-ronments back up their data several times a day because of the large number ofchanges that happen within a short period of time. 214881-6 ch15.F 11/12/01 8:31 AM Page 461Chapter 15 &' Backing Up Your Linux System461Backup typesYou can perform four main types of backups:FullIn this type of backup, all files are backed up every night.This is the most simpleand effective type of backup, but can be limited by the amount of data that youhave.A full backup may be impractical if your file systems are very large, contain-ing hundreds of gigabytes.Depending on the size and speed of your backup device,a full backup may involve many sets of backup media, and the process may take avery long time to complete.The advantage of a full backup is that you always havethe most recent files backed up properly, which makes restores very easy and con-venient to perform.Full backups should be performed prior to adding new applications or hardware,and prior to a change in server configuration.IncrementalIn this type of backup, all files that have changed since the previous backup arebacked up.For example, a certain file is only updated on Wednesday mornings.Therefore, the next backup, which happens at 11:00 p.m., will backup that file.Thefollowing day, the file will not be modified, so it won t be saved during that night sbackups.The advantages of using an incremental backup system is that you don tuse as much tape because you aren t performing a full backup each night.Incremental backups also cut down the amount of time required to perform anightly backup.One major disadvantage of an incremental backup system islengthy restore times.If you need to restore a full set of files, you will need the lastfull backup and every incremental backup to restore them in order.Another disad-vantage is that your backups will be spread across multiple media, making therestore process more complicated.DifferentialIn the differential backup scheme, all files that have changed since the last fullbackup are backed up.For example, a certain file is only updated on Wednesdays.The backup that takes place at 11:00 p.m.will back up that file.On the Thursdaynight backup, the file is still backed up because it changed since the last fullbackup  even though the file did not change that day.The advantage of a differen-tial backup is that to restore a full system, you only need the last full backup andthe last differential backup.The downside of the differential scheme is that it usesmuch more disk media than an incremental backup.ArchiveIn an archive backup, data from your file systems are backed up to a storage device,but the original files are then removed from the server [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • anikol.xlx.pl