]> andersk Git - moira.git/blob - regtape/reg-update
Now rcp'ing with encryption, and actually checking that backup succeeded.
[moira.git] / regtape / reg-update
1 #!/bin/sh
2 #
3 #  Script to update Moira from Registrar's "tapes".
4
5 date=`date +%y%m%d`
6 ##### date=`expr $date - 1` # files are postdated by 1 day
7
8 for 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 \
14   && [ `diff $who.input.0 $who.input | wc -l` -lt 500 ] \
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
18 done
This page took 0.038158 seconds and 5 git commands to generate.