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 –