755 757




Linux Unleashed, Third Edition:Backups





-->















Previous
Table of Contents
Next




Setting a Backup Schedule
One of the most important aspects of making backups is to make them regularly. This is much more important for systems that support many users and have constantly changing file systems. If your Linux machine is used only for your own purpose, you can make backups when you feel there is material that should be backed up.

For most systems with only a few users, constant Internet access for email or newsgroups, and similar daily changes to the file system, a daily backup schedule is important. This doesn’t mean you have to make a full backup of everything on your hard drives every day; consider using incremental backups, which copy only those files that are new or have changed since the last backup.
Most UNIX system administrators prefer to perform backups during the night or early hours of the morning since there are few users logged in and no real load on the CPU, as well as the least number of open files at any one time. Because backups are easily automated using cron (see Chapter 46, “cron and at”), the exact backup time can be set to minimize impact on any other background processing tasks that may be run by the system. Since you don’t have to manually start the backup process, it can be done at any time. All the system administrator has to do with this kind of backup schedule is check that the backup was completed properly, change the backup media, and log the backup.
For those with a single user or a lightly loaded Linux system, backups can be done practically anytime, although it is a good idea to have the backups performed automatically if your system is on all the time. If your Linux system is only active when you want to use it, you should get in the habit of making a backup while you do other tasks on the system.
There is a bad practice used by many DOS or Windows users when they move to UNIX backups: they keep a single tape (or other media) and continually recycle that one unit every time there is a backup. It is foolhardy to keep only one backup copy of a system as this prevents you from moving back to previous backups. For example, suppose you deleted a file a week ago and had it safely stored on a backup tape at that time. When you reuse the backup tape, the old contents are erased and you can never get the old file back.
Ideally, backup copies should be kept for days, or even weeks, before being reused. On systems with several users this is even more important because users will often remember that they need a file they deleted two months ago, after you have already recycled the tape a few times. There are methods to backup scheduling that help get around this problem, as you will see in a moment. The ideal backup routine varies depending on the system administrator’s ideas about backups, but a comprehensive backup system requires at least two weeks of daily incremental backups and a full backup every week.
A full backup is a complete image of everything on the file system, including all files, and the backup media required is usually close to the total size of your file system. For example, if you have 150MB used in your file system, you will need about 150MB of tape or other media for a backup. With compression algorithms, some backup systems can get the requirements much lower, but compression is not always available. Also, you may need several volumes of media for a single full backup, depending on the capacity of the backup unit. If your tape drive can only store 80MB on a cartridge and you have to backup 150MB, you need two tapes in sequence for the one backup. Since the Linux system’s cron utility can’t change tapes automatically, full backups over several volumes require some operator interaction. Obviously, making a full system backup on low capacity media (like floppy disks) is a long, tedious problem as there are many volumes that must be switched.
Incremental backups (sometimes called differential backups) back up only the files that have been changed or created since the last backup. Not all operating systems have a file indicator that shows which files have been backed up (like DOS does, for example). Linux is one of these, although the modification date can be used to effectively act like a backup indicator.
Incremental backups are sometimes difficult to make with Linux, unless you restrict yourself to particular areas of the file system that are likely to have changed. For example, if your users are all in the /usr directory, you can backup only that file system area instead of the entire file system. This is often called a partial backup, as only a part of the file system is saved. (Incremental backups can be made under any operating system by using a background process that logs all changes of files to a master list, then uses the master list to create backups. The overhead of such a scheme is seldom worth the effort, though.)



Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
755 757
ReadMe (755)
ReadMe (757)
20030817180104id!755
745 755
LX756 757
757 759
204 208id(757
mbdch20 757
755 (2)
757? slovniky1
753 757
mbdch20 755
2012 04 25 Rozp MTBiGM w sprawie szczegółowego zakresu i formy projektu budowlanegoid 755

więcej podobnych podstron