I'm now using this script to do a strategy #1 backup of my citadel server as a cron job.
It assumes you have a /root/backups/ directory and works on Ubuntu 8.10 Server with Citadel installed using "Easy Install"...
Basically, it shuts down citadel, waits for a bit for the service to complete shutting down, tars the citadel files to the selected location and restarts teh citadel service.
Enjoy.
#!/bin/sh
# Fear of Mice's Backup for Citadel
# http://www.fearofmice.co.uk/blog
CITADEL_DIR=/usr/local/citadel
TIMESTAMP=`date +%Y%m%d_%H%M%S`;
echo $TIMESTAMP
echo -n "Stopping Citadel... "
if $CITADEL_DIR/sendcommand DOWN >/dev/null 2>&1 ; then
sleep 10
echo "ok"
rm -f /usr/local/citadel/citadel.pid 2>/dev/null
echo "backing up..."
tar -cvf /root/backups/citadel_$TIMESTAMP.tar /etc/init.d/citadel /etc/init.d/webcit /usr/local/citadel/ > /root/backups/citadel_$TIMESTAMP.log
sleep 5
echo "backed up"
echo -n "Starting Citadel... "
if $CITADEL_DIR/citserver -d -h$CITADEL_DIR
then
echo "ok"
else
echo "Starting Citadel failed"
fi
else
echo "Stopping Citadel failed"
fi
This is the official blog of

We aim to post comments (and possibly solutions) to some of the more interesting IT Support issues we come across in our daily travels around the South Hams of Devon.
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | Current | > >> | ||||
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||