]> andersk Git - moira.git/blame - regtape/reg-update
Now rcp'ing with encryption, and actually checking that backup succeeded.
[moira.git] / regtape / reg-update
CommitLineData
b739e5bc 1#!/bin/sh
2#
3# Script to update Moira from Registrar's "tapes".
4
f6d49afc 5date=`date +%y%m%d`
6##### date=`expr $date - 1` # files are postdated by 1 day
b739e5bc 7
8for who in staff students ; do
9 [ -f /moira/tapes/$who.input.$date.Z ] \
10 && cd /moira/ \
11 && mv $who.input.0 $who.input.1 \
12 && mv $who.input $who.input.0 \
13 && zcat tapes/$who.input.$date.Z > $who.input \
f6d49afc 14 && [ `diff $who.input.0 $who.input | wc -l` -lt 500 ] \
b739e5bc 15 && bin/$who -n $who.input > $who.output.$date 2>&1 \
16 && egrep -v "($who): (adding|updating)" $who.output.$date > $who.err 2>&1 \
17 && cat /usr/local/lib/mail_header $who.err | mail dkk
18done
This page took 0.056043 seconds and 5 git commands to generate.