More System Administration Topics Br. David Carlson Last Updated: 03/09/03 Backups: Tape backups are important. Imagine how your users will yell if critical data files are corrupted or lost! The basic command to handle tape backups is tar. On our Linux system, we use something like the following: A full backup is accomplished with a command such as: tar -cvf /dev/st0 /* To restore everything from tape use: tar -xvf /dev/st0 To restore only certain files from tape use: tar -xvf /dev/st0 Note that each file must be listed with the exact pathname used in the backup tape. To view what is on a tape you can use: tar -tvf /dev/st0 To erase a tape you might use: mt -f /dev/st0 erase Fixing file system problems: If the file system has been damaged, try the following. Log in as root and use the following to go to single user mode: init 1 Use "umount ", where mount point is where the file system is mounted. For example, to check /users you would use: umount /users Use "fsck -f " where fsname is the name of the filesystem you want to check (/dev/hda1, /dev/sda1, etc.). (Use df to see your filesystems.) See what errors are reported. Then try one of the following to fix things: To fix the filesytem automatically use: fsck -a / To fix the filesystem in interactive mode use: fsck -r / Then remount the filesystem with a command of the form: mount -w -n -o It's now probably a good idea to do a shutdown of the system and then restart it to see how things work. Messed-up terminal settings: It is easy to mess up the terminal display by trying to display non-text files on the screen. The following can be tried to fix this: reset stty sane Adding users to a group: The system administrator can simply edit the /etc/group file to place the users' IDs in the list following the desired group. New groups can be created by adding a new line in this file as long as it follows the format shown in the following example and uses a reasonable group ID number. cs256-1::107:root,jonesk,williams,smithc Log files: UNIX systems can log various events. This is handled by syslogd, the syslog daemon. The log files are often stored in /var/adm, /var/log, or similar and need to be cleaned up on occasion so that they don't grow to fill the filesystem! You might want to keep backups of old log files for a time, perhaps compressed with gzip to save space. What version of UNIX am I running? Try the following command to see what kind of system you have: uname -a Checking up on networking: The usual command to check up on things related to the network is netstat. Use "man netstat" to see what options to use with your system.