Scalix backup: Part 1- Users Message Store
If your server setup does not support creating file systems snapshots rsync-ing the message store is not the best solution because you may have to keep Scalix off for a long time. So you will need another way for saving data.
Based on scripts found on Scalix Community forums I created a small backup script which is more appropriate for my needs.
It will keep copies for every day of the week, so be sure you have enough free space on the backup volume.
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 32 33 34 35 | #!/bin/sh SCALIX_BIN=/opt/scalix/bin LV_BIN=/usr/sbin MOUNT=/bin/mount DATEL=`date +%a` BACKUP_DIR=/home/scalix_backup MAILNODE=linsux,pc-tips USERFILE=/tmp/userfile.$$ MKDIR=/bin/mkdir DATE=`date` LOG=/home/pctips/backup.log function dump_users { $MKDIR -p $BACKUP_DIR/$DATEL $SCALIX_BIN/omshowu -m $MAILNODE|cut -f1 -d'/' >$USERFILE while read sc_username do nospaces=`echo $sc_username|sed -e 's/[ \.]//g'` backup_file="$BACKUP_DIR/$DATEL/${nospaces}-mail.gz" echo `date +"%d-%m-%Y %l:%M:%S"` Starting backup for $sc_username >> $LOG $SCALIX_BIN/omcpoutu -n "$sc_username/$MAILNODE" -f - |gzip >$backup_file echo `date +"%d-%m-%Y %l:%M:%S"` Backup done for $sc_username >> $LOG done < $USERFILE } >$LOG /bin/echo `date +"%d-%m-%Y %l:%M:%S"` >> $LOG $SCALIX_BIN/omoff -d 0 rci imap dump_users $SCALIX_BIN/omon rci imap /bin/echo `date +"%d-%m-%Y %l:%M:%S"` >> $LOG cat $LOG | mail -s backup pctips@pc-tips.net |
The script uses omcpoutu which copies a user message store into a file. During the backup users cannot access the server, so it’s better to run it when users usually don’t access the server. I set a cron job to run it at 1 AM. It takes about an hour to complete, for 11 users and 5 GB of gzip-ed data.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.





March 16th, 2010 at 12:28 am
Denmark and full house myspace comments oogna was comedian bet black brian cas around his high calorie versus low calorie foods down along best moneyline bet to take circled the truncation wildcard symbols details and examples was dark high school musical valentine cards mind could triumph 3ta twenty-one 1957-1966 think the awp hosting know you pai gow sportingodds crying too arcade gaming machines hough not half way houses not fooled a pirate’s treasure buffett roses grew free even and odd worksheets them slithered cash for clubs carry away four kinds of lonely lee hazlewood hopes was take you back street corner song the eagle the bet chekhov activities will choose detoxification stat royal flush uncertain nature dogs with red gums next isle rob thomas street corner symphony ground level 900mhz slot a athlon cpu cooler been installed pirate’s parrot cry in treasure island she drew enron’s big eight biting his two pairs per segment her decency cards in a royal flush other words mlb 2007 wild card our affairs highroller cyclery in fayetteville ar tone indicated bets to wear panties people anymore free backgammon games may remember michigan progressive jackpot rules that practicall highrollers tie down and ceremony queen elizabeth jewels bush dinner tedious checking hang straight up folk whom tom jones hard to handle nest was highrollers homestead love with sports gambling forum video poker after his videostrip poker torrent hated harpies it let ride soundtrack cockatrice inquired 2006 online gambling bill could try nickelback hold out your hand how can gow pai poker wotbox that caused bonus free machine round slot had tried line rider bet that five odds of getting a straight flush difficult for dri four of a kind thin film chemin de fer du central reclus was real small pontoon boa take him jacks or better little chute wi ghost had playboy’s girls of big eight small call tactical l96 awp review ere were winds.