#!/bin/sh
#
# Backup script for Cygnus. You'll need to change some of the info
# below.

# Change this to the directory you installed Cygnus in.
# If you used the configure defaults, then this is accurate.

cd ~/cygnus

# What files should we back up? You can put * here if you want it all
# (including the binary). I recommend *.db *.log *.conf.

FILES="*.db *.log *.conf"

# Where should be move the backup archive when we're done with it? I'd
# recommend the default, which would put it in ~/backups.

BACKUPDIR=~/backups

# I wouldn't mess with this too much. This zips the files you
# specified above into a file stamped with the date and time.
# ie, if you ran this script at 1:50pm on April 5th, 2000, you would
# end up with a file named cygnus-000405-1350.tgz.
# (Historical note: the above date is when I wrote this script :P -skold)

BACKUPFILE=cygnus-`date +%y%m%d`-`date +%H%M`.tgz

tar czf $BACKUPFILE $FILES 

# This moves the file to a backups directory, if one exists.

if [ -d $BACKUPDIR ] ; then
    mv $BACKUPFILE $BACKUPDIR
fi
