Table of Contents
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:
Log in as or su to root.
Insert a tape into the tape drive.
Type "backup <arg>". (See below)
The program performs the appropriate function.
Log out/exit.
The backup program is invoked as follows:
Invoke the backup program.
Prepare a new tape to recieve information or erase an old tape.
Backup the root information as explained above.
Backup the user information as explained above.
The restore program is invoked as follows:
Invoke the restore program.
Reload the root information as explained above.
Reload the user information as explained above.
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.
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.
Login as or su - to the root user.
csadmin$
su -
Password:
<type root's password and press Enter>
root#
Change to the /cdrecord directory.
root#
cd /cdrecord
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.
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.
Insert a blank CD into the CD/DVD writer.
Change to the /cdrecord directory.
csadmin$
cd /cdrecord
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.