Skip to content.

UPR HPCf

Sections
Personal tools
You are here: Home » Members » humberto's Home » Test ZWiki » TapeBackupProcedures
Views

TapeBackupProcedures

last edited 6 years ago by humberto

Backups at the HPCf

Abstract

This document describes the backup procedures for user and system data at the HPCf. It includes an overview of the backup process, a description of the software in use, installation and operation instructions. I also describe the physical storage of the backup tapes.

See Also

ManualTapeHandling - for information on driving the tape robot and drive manually (also usefull for restoring amanda backups).

Introduction

The HPCf currently houses approximately 400GB disk space, with plans to triple this capacity in the near future. This document seeks to explain how to back up this data, to ensure it's availability for users. We use the Advanced Maryland Automatic Network Disk Archiver (amanda, http://www.amanda.org/) to backup our entire network. Amanda is a client server package, the server runs on boreas.hpcf.upr.edu, clients run on each machine to be backed up. Amanda drives an 8 tape DLT stacker, each tape has a capacity of 35GB uncompressed. On each client, amanda uses the native dump program to perform backups, these are then compressed and sent over the network to boreas, which spools several backups into it's holding disk (/BACKUP/amanda1) before sending the backups to tape.

Obtaining the software

Tape server software

Amanda is a client server package, the server software is installed onto the machine that hosts the tape drive. At the HPCf this is currently boreas.hpcf.upr.edu. The 8 tape DLT stacker used at the HPCf is driven by the chg-scsi program in amanda. This program will not compile on IRIX systems in the official release of amanda. Instead, we use the beta version of amanda on boreas. Beta 1 of amanda available from sourceforge

Client software

We use amanda version 2.4.1p1 on the client stations, as the beta 1 has some problems on sgi machines (it leaves xfsdump processes running on dartagnan). Amanda for IRIX is available on the sgi freeware CD. I installed the package fw_amanda.sw_amanda, which expects a user called amanda in the password file.

On the linux boxes, I've installed VA Research's amanda RPMs?, as the ones I found for redhat didn't include dump support. In addition, there seems to be a bug in the dump package included with redhat 6.0. it dumps core backing up the /home filesystem on astraeus. I've upgraded dump there to version dump-0.4b15-1. The VA Research rpms are available from

ftp://ftp.valinux.com/pub/software/VALinux/6.1.3/i386/RedHat/RPMS/

NOTE It seems like the va linux rpms no longer have dump support. I downloaded the amanda source rpm from valinux and built it on a machine that has dump installed. These rpms are available from:

http://hpcfinfo.hpcf.upr.edu/amanda/

RedHat? 7.1 can use the dump, gnuplot, and amanda rpms included with the system.

Install dump, amanda and amanda-client on the linux machine you wish to backup. You need to create an .amandahosts file in the amanda user home directory, containing "boreas.hpcf.upr.edu backup", this file must be readable by group disk, and the amanda home directory must allow access by group disk as well.

RedHat? 7 installed amanda user with home in /root, Redhat 7.1 puts amanda's home in /var/lib/amanda, please change the following accordingly.

# chgrp disk /root
# chmod 710 /root
# vi /root/.amandahosts
# chgrp disk /root/.amandahosts
# chmod 640 /root/.amandahosts

You should create /etc/dumpdates, and make it writable by group disk. Any partitions you wish to backup must be readable by group disk.

Make sure you have an amanda line in your /etc/services file:

amanda                   10080/udp                                                        # amanda backup services

To allow the amanda daemon to run, add an entry to inetd (or xinetd), here's the one I use on astraeus:

#Amanda Client
amanda   dgram  udp wait         operator.disk /usr/sbin/tcpd /usr/lib/amanda/amandad

After adding the line to /etc/inetd.conf, reload the inetd file (/etc/rc.d/init.d/inet reload)

RedHat? 7 uses xinetd instead of inetd, and the rpms of amanda seem to be broken.

You will have to create /etc/xinetd.d/amandad by hand

# default: off
#
# description: Part of the Amanda server package

service amandad { disable = no socket_type = dgram protocol = udp wait = yes user = operator group = disk server = /usr/lib/amanda/amandad port = 10080 }

RedHat? 7.1 amanda xinetd file is correct, just remember to chkconfig --level 345 amanda on

Configuration

Server configuration

I configured amanda on boreas according to the instructions in the source package (see: /usr/people/backup/amanda-2.4.1p1/docs/INSTALL ). We've created a user called backup that owns the amanda packages. The configured source code for amanda is in /usr/people/backup/amanda-2.4.1p1. The software was configured with the command:

 # ./configure --with-user=backup --with-group=backup --with-amandahosts

Adding a disk

To add a disk to the backup rotation on a machine that already has the backup software installed you need to add the disk to the disklist file on boreas, and ensure the backup user has read access.

To add the disk to the disklist, login as backup on boreas

$ cd /usr/local/etc/amanda/HPCf
$ vi disklist

Add a line like

machine /partition {dumptype}

to the disklist file, I usually use the mount path instead of the partition (easyer to remember), and use comp-user or comp-root as the dumptype.

Here's the actual line for dartagnan:/usr/people partition:

dartagnan /usr/people comp-user

To allow the backup user to access the drive, on linux simply make the device mode 0640, owner root, group disk (the backup user is already in the disk group).

$ df -h
Filesystem                              Size  Used Avail Use% Mounted on
/dev/sda3                                8.0G  2.5G  5.1G  33% /
/dev/sda1                                125M  5.3M  113M       5% /boot
/dev/sdb1                                8.4G  6.3G  1.6G  79% /home

$ ls -l /dev/sda3 brw-r----- 1 root disk 8, 3 May 5 1998 /dev/sda3

On the sgi's, the devices get remade every time the machine reboots, so you need to chmod the raw device for the partition to 0640 root.sys, and add a line to /etc/ioperms to do this on reboot.

% df -h
Filesystem                               Type  Size     use  avail  %use  Mounted on
/dev/root                                       xfs     17G  5.4G        11G    33%  /
/dev/dsk/dks0d2s7                xfs    17G  9.7G       7.2G    58%  /usr/people

% cat /etc/ioperms /hw/rdisk/root 0640 root sys /dev/rdsk/dks0d2s7 0640 root sys

% ls -l /dev/rdsk/dks0d2s7 crw-r----- 1 root sys 0,236 Jan 17 15:11 /dev/rdsk/dks0d2s7

Machines running sgi propak 1.3 use devfs, and also need to make sure device permissions are saved and restored correctly.

Modify /etc/devfs.conf, look for the part that reads:

#
# Uncomment this if you want permissions to be saved and restored for the main
# devfs (usually mounted on /dev)
REGISTER                  .                              COPY   /dev-state/$devname $devpath
CHANGE                   .                               COPY   $devpath /dev-state/$devname
CREATE                   .*                               COPY   $devpath /dev-state/$devname

Then reboot, now make changes to the device permissions so that group disk can read the partitions:

# ls -l /dev/hda1
lr-xr-xr-x       1 root   root                    33 Jun 11 07:39 /dev/hda1 -> ide/host0/bus0/target0/lun0/part1
# chgrp disk /dev/ide/host0/bus0/target0/lun0/part1
# chmod g+r /dev/ide/host0/bus0/target0/lun0/part1
# ls -l /dev/ide/host0/bus0/target0/lun0/part1
brw-r-----       1 root   disk           3,     1 Dec 31  1969 /dev/ide/host0/bus0/target0/lun0/part1

As the backup user on boreas, check to make sure the permisions are OK by executing

$ amcheck -c HPCf

this will alert you if any problems are found.

-- Main.HumbertoOrtiz - 07 Dec 2000

Updates to installation on redhat 7 and adding disks to devfs equipped machines.

-- Main.HumbertoOrtiz - 20 Jun 2001

Updated for RedHat? 7.1

-- Main.HumbertoOrtiz - 09 Nov 2001

 

Powered by Plone

This site conforms to the following standards: