Browse KB by category:
Go to KB #:
How do logical backups simplify restores?
Logical Backups Simplify Restores
Large Unix Filesystem Backups Complicate Single File Restores.
As the size of the average Unix filesystem grows to capacities exceeding multiple gigabytes (GB ), restoring a single file from a normal tape device becomes more time consuming and frustrating to users and administrators. With most system utilities, if a file required two hours to be placed onto tape, it will also require two hours to recover. Through the use of proper backup design and management, a backup administrator can reduce the time required for restoring a single file or small group of files.
On every Unix system, no matter what type of tape device you use, there are tools that will enable you to reduce the time and frustration of a single file restore. One of the best kept secrets of Unix backup is the 'mt' command. On SCO systems this utility is called 'tape' while AIX users have come to recognize it as 'tctl'. No matter what it's called, this utility can help you do things with your backups that you probably thought that you'd have to spend large amounts of cash to accomplish.
For the sake of brevity, we won't duplicate the man page for mt (from here on out, read mt to mean whatever your utility is called). However, we will discuss some of the more important options offered.
One of the easiest things to do to reduce restore times is to segregate your backups into filesets, or savesets. For example if the following directory structure existed:
In this case, the /u and /u2 entries are actually mount points for additional filesystems.
One idea would be to backup the /, /u and /u2 paths as separate, segregated entities on tape. The problem is in deciding HOW you will write the data to tape. This is where the mt command comes into play. By using the no-rewind tape device to write the backups, we could use a script similar to the following:
This will result in three separate, segregated backup/file sets on the same tape. Now, by using mt to space to the appropriate filemark, we can reduce the amount of tape searching required to restore a given file to a single set, instead of the entire tape volume. In this example, the / files will be in the first backup/file set on tape (no filemarks needed), /u will be the second (fsf 1 from a rewound tape) and /u2 will be third (fsf 2 from a rewound tape).
To restore a file from /u/tjones, you would use:
mt -f /dev/nrst0 fsf 1
|Others in this Category|
|How Much Space Remains on a Tape?|
|What does 'Connection Reset by Peer' mean?|
|Tape Drive and Cartridge Compatibility Matrix|
|How do I calculate the time it will take to backup my data?|
|Buffer Size Limitations|
|» More Articles|