AW: [IRCServices] Backup databases?
Chris Knipe
savage at savage.za.org
Wed Nov 14 07:51:02 PST 2001
Isn't it maybe a good time to start some sort of contrib for services?
Allot of people has been asking for scripts lately, and when services
becomes modular, I can see allot more requests for custom code starting to
rise...
As such, I'll start this off with both a contrab script to check that
services is running, aswell as a small backup script to tgz tha services
DB.
On Tue, 13 Nov 2001, Strider wrote:
>Aren't there shell scripts and etc already available to do this sort of
>thing? Not specifically for services...but for anything you want.
>
>www.freshmeat.net is a great place to look if there is a program to do this.
>
>-------Original Message-------
>
>From: ircservices at ircservices.za.net
>Date: Tuesday, November 13, 2001 01:36:29 PM
>To: ircservices at ircservices.za.net
>Subject: AW: [IRCServices] Backup databases?
>
>Hi,
>
>I don't think this is a services issue. Maybe you should simply write a
>little crontab who does exactly what you just described. You don't need any
>support from services' side for this.
>
>Georges
>
>-----Ursprüngliche Nachricht-----
>Von: ircservices-admin at ircservices.za.net
>[mailto:ircservices-admin at ircservices.za.net]Im Auftrag von Craig McLure
>Gesendet: Dienstag, 13. November 2001 20:28
>An: ircservices at ircservices.za.net
>Betreff: [IRCServices] Backup databases?
>
>
>would it be possible in an upcoming version of services to have an automatic
>back up system?
>i recently had my providers HDD going bust after a power failure, lost all
>databases (and IRC shite at that)
>just something that can be scheduled every 2hrs lets say, that uploads a tar
>gzipped copy of the databases to another FTP so if something *DOES* happen
>and all data is lost, there is a backup :)
>
>--
>Craig McLure
>Craig at e-tidalwave.org
>WaveAdmin on the e-tidalwave IRC Network
>Ride the Wave! www.e-tidalwave.org
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>-----------------------------------------------------------
>To unsubscribe, mail ircservices-request at ircservices.za.net
>with the word UNSUBSCRIBE in the subject of the mail.
>http://www.ircservices.za.net/mailman/listinfo/ircservices
>
>-----------------------------------------------------------
>To unsubscribe, mail ircservices-request at ircservices.za.net
>with the word UNSUBSCRIBE in the subject of the mail.
>http://www.ircservices.za.net/mailman/listinfo/ircservices
>
>.
--
Regards,
Chris Knipe
(083) 430-8151
-------------- next part --------------
#!/bin/sh
# Setup date for the reports
DATE=`date +%Y-%m-%d`
# Generate Daily Tarbal
# Generate Daily Tarbal
mkdir /home/savage/ircd/data/tmp
cd /home/savage/ircd/data/tmp
cp ../*.db .
cp ../services.log .
tar czf $DATE.tgz *
mv $DATE.tgz ../
rm -rf /home/savage/ircd/data/tmp
-------------- next part --------------
#!/bin/sh
SERVBIN=services
SERVPIDFILE=data/services.pid
SERVPATH=/home/savage/ircd
cd $SERVPATH
if test -r $SERVPATH/$SERVPIDFILE; then
SERVPID=$(cat $SERVPATH/$SERVPIDFILE)
if $(kill -CHLD $SERVPID >/dev/null 2>&1)
then
# lucky for us SERV is still up
exit 0
fi
echo ""
echo "stale pid file (erasing it)"
rm -f $SERVPATH/$SERVPIDFILE
fi
echo ""
echo "Services is dead........restarting Services"
echo ""
if test -x $SERVBIN ;then
$SERVPATH/$SERVBIN
exit 0
fi
echo "could not reload"