Download System Administration

Transcript
12.4 tar Backups
ufsrestore xvf /dev/rmt/0 etc/inet/hosts
or, for the interactive version:
ufsrestore fi /dev/rmt/0
With most disk slices you will first need to create a temporary directory, such as
/export/home/tmp, for restoring individual data files. If you ever want to restore an
entire disk slice, you must of course not use a temporary directory, otherwise you would
duplicate the contents of the entire slice, and you would most likely run out of disk space.
It should rarely be necessary to restore an entire disk slice.
12.4 tar Backups
Because files in user home directories are changed often during day-to-day operation,
doing manual tape dumps would be inefficient and time-consuming for the superuser. On
the other hand, users do not have the permission to use ufsdump. So every user will
probably automatically use the tar program (see “tar Command,” page 149) to make
individual backups (archives) of his or her NMR data and the other customized files in the
user’s home directory.
12.5 Backups Using cron
In multiuser environments, frequent backups are highly recommended. The cron
command can be quite helpful in this case. It executes jobs at a defined time according to
a list in /var/spool/cron/crontabs/user. Each user, including root, has a
crontab file named user. Editing this file directly has no effect. To activate entries, each
user enters the crontab -e (edit option) command.
Sometimes an uncommon line editor is defined as the standard editor. You can change to
the vi editor by setting the environment variable EDITOR to vi (as root, use
EDITOR=vi; export EDITOR).
To make a backup of /data (partition /dev/dsk/c0t3d0s7) at 4 o’clock in the
morning, from Monday through Friday, you (as root) have to enter:
0 4 * * 1-5 commands
where commands are UNIX commands separated by semicolons. Here the string
commands is replaced by, for example,
cd /; ufsdump 1ucbfs 40 /dev/rmt/0 590 /dev/dsk/c0t3d0s7
Messages from commands that usually go to the standard output are mailed to the user,
which allows checking for execution and errors. Make sure that a tape drive is connected
to the system and a tape of high enough capacity is loaded. Two tapes should be used, at
least exchanging them from backup to backup (see above).
12.6 Data Compression
Over the years, the capacity of disks and tapes has grown continuously. At the same time
the requirements on disk space have increased and, with the advent of multidimensional
NMR, the size of the FID alone can exceed the size of a single 1/4-inch tape of 150 MB.
Data compression is a very helpful tool for reducing the size of files and reducing time
especially for archiving on tapes.
01-999166-00 C0503
System Administration
179