Chapter 7. System Maintenance

Table of Contents

1. Backup the System to Tape
2. Creating and Writing CD/DVD Images
2.1. Creating a CD/DVD Image
2.2. Writing a CD/DVD Image

1. Backup the System to Tape

The backup program allows backups to be made of two groups of files.

The first is the "root" group. Backup of this information is required only when changes are made to Linux and the files associated with it. For example, if new users are added to the system.

The second is the "users" group. As new particle runs are added, this information changes and should be backed up. Currently the backup shell script copies all files owned by postgres, csadmin, csoperator, and kitchen to tape.

The restore program is used to copy files from a tape to the disk. When this operation is performed, files are created or modified on the disk as necessary.

The backup and restore programs are shell scripts and are easy to change. As the amount of information contained on the disk drive grows, the shell scripts may have to be changed in order for all of the information to correctly write to and read from tape.

The backup and restore programs both use the program tar to perform their jobs. See the Linux manuals for information on how to use tar.

Use these steps to perform a backup:

  1. Log in as or su to root.

  2. Insert a tape into the tape drive.

  3. Type "backup <arg>". (See below)

  4. The program performs the appropriate function.

  5. Log out/exit.

The backup program is invoked as follows:

backup <arg>

Invoke the backup program.

init

Prepare a new tape to recieve information or erase an old tape.

root

Backup the root information as explained above.

users

Backup the user information as explained above.

The restore program is invoked as follows:

restore <arg>

Invoke the restore program.

root

Reload the root information as explained above.

users

Reload the user information as explained above.

2. Creating and Writing CD/DVD Images

To aid in the backup of data, NEC generally provides a CD/DVD writer with each control system. This section will cover the basic usage of some scripts to create and write standardized backups of AccelNET releated data. If you would like to use the CD/DVD writer for other purposes, using a graphical application such as xcdroast[1] or K3b[2] is recommended. The scripts provided are wrappers to the following command line tools: mkisofs, cdrecord, growisofs.

2.1. Creating a CD/DVD Image

CDs and DVDs are normally written using what is refered to as an image. An image can be in many different formats depending on the methods used to create it. The most universal of these images is called an ISO and conforms to the ISO9660 specifications.

The typical usage for CD/DVD images is to backup the AccelNET directory tree. The files contained in the AccelNET tree are owned by several different users and groups. Because of this, the root user must be used to create the backup image. The following is a set of procedures to produce what is called an AccelNET snapshot.

  1. Login as or su - to the root user.

        csadmin$ su -
        Password: <type root's password and press Enter>
        root# 
        
  2. Change to the /cdrecord directory.

        root# cd /cdrecord
        
  3. Use buildit to create the image.

        root# ./buildit snapshot
        

The file /cd.accelnet will be created that can be burned to CD or DVD.

The buildit command may also be used to create custom CD/DVD images. For usage information, run buildit without any arguments.

2.2. Writing a CD/DVD Image

Once an image has been created, either using the buildit or on your own, it needs to be written to a CD or DVD. To accomplish this, the recordit is used. The following is a set of procedures to write the snapshot image to a cd.

  1. Insert a blank CD into the CD/DVD writer.

  2. Change to the /cdrecord directory.

        csadmin$ cd /cdrecord
        
  3. Use recordit to write the image.

        csadmin$ ./recordit cd snapshot
        

The recordit command may also be used to write custom CD/DVD images. For usage information, run recordit without any arguments.



[1] http://www.xcdroast.org/

[2] http://www.k3b.org/