#!/bin/csh -f
#
# Utility to make incremental backups of the OLC server.
#
# The files are copied to somewhere else on the RD54, where
# they are compressed using 'compress'. The files are then
# copied to a temporary store on '/mitmatisse_backup'
#
# The list of files to be backed up are listed in 'incremental_list'
#
# Tom Coppeto
# 5/25/88
#

set DEST=/mit/matisse_backup/incremental/Writable
echo `date`: starting incremental backup

foreach file (`cat /mit/matisse_backup/incremental.list`)
	cp $file /u1/tmp/backup_file  
	compress -f /u1/tmp/backup_file  
	cp /u1/tmp/backup_file.Z $DEST/$file.Z
        if (! $status) then
 	   echo `date`: copied $file 
        else
           echo `date`: error copying $file
        endif
	/bin/rm /u1/tmp/backup_file.Z
end

echo `date`: incremental update done. 	
