How to Backup Your Files' Structure

By eHow Computers Editor

Rate: (0 Ratings)

Reliable backups are an important part of system administration and disaster recovery. UNIX, by default, includes the tools to back up your files' structure effectively. In addition, regular recovery drills should be performed in order to ensure you can recover from your backup in the event of a problem with your server. The following steps outline the procedure to effectively back up your files' structure.

Instructions

Difficulty: Moderately Challenging

Step1
On a regular basis, print the output of the following commands: df -k, ifconfig -a, netstat –rn, uname -a. Place the printout in a location that would be accessible in the event a disaster occurs.
Step2
Plan to back up all the vital file systems on your system, such as root (/), /usr, /var, /boot and any important application file systems. Each file system should have its own separate backup.
Step3
Identify your backup device. It will be something like /dev/tape for a tape drive, or /dev/sdz1 for a disk.
Step4
Backup utilities vary by UNIX or Linux type, but the most common are tar, ufsdump and dump. Let’s use dump in this example.
Step5
Our first example will back up the /home file system to tape. Type the command:
dump 0uf /dev/tape /home
Step6
To restore interactively from this backup, cd to /home, then type the command:
restore -i /dev/tape
Step7
In the next example, we back up /home to a remote file system over a secure shell connection. Type the command:
tar xf - /home | ssh remotehost “cd /home_backup; cat | tar xBpf - “
Step8
To restore from this backup, type the command:
ssh remotehost “cd /home_backup; tar xf - .” | cd /home; tar xBpf –

Tips & Warnings

  • In Linux, the fifth field of /etc/fstab will allow you to specify whether to back up that file system. Enter a 0 to skip this file system, and a 1 to include it in the dump.
  • Software is available that makes performing back up and recovery tasks much easier. Such utilities are not included with your UNIX or Linux distribution and must be purchased separately. Two of these products are Legato Networker and Veritas NetBackup.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article:  How to Backup Your Files' Structure

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads