Webcal Admin Tips
Author:  Ruwan Jayasinghe <rjayasin**lausd.k12.ca.us>
Contributor: Darrell May, Placido Sanchez, SarahJ
Release supported: SME 5.6
License: GPL
Last updated: October 10, 2003
RJ
Problem: You now have Webcal-on-SME/E-Smith working on your SME box. Need to keep it running, hell or high water.
Solution:  Checkout the tips below
TIP#1: Changing the Name of a Calendar in WebCal/Mysql

##Log on as "root" on your SME Server 

root#>mysql
mysql> update webcal set cal_name = replace(cal_name,'Old_Calendar_Name','New_Calendar_Name');

EX: The Athletic Director's Calender(AthDirector) needs to be changed to "Sports"
mysql> update webcal set cal_name = replace(cal_name,'AthDirector','Sports');

##Then

[root@hostname root]#mv /opt/Webcal/files/Old_Calendar_Name /opt/Webcal/files/New_Calendar_Name

EX: The Athletic Director's Calender(AthDirector) needs to be changed to "Sports"
[root@hostname root]#mv /opt/Webcal/files/AthDirector /opt/Webcal/files/Sports

TIP# 2: Changing a calendar from public to private or vice versa 

[root@hostname root]#cd /opt/Webcal/files/Calender_Name

##Change from public calender to private calender
[root@hostname Calendar_Name]#mv .public .private

##Change from private calender to public calender
[root@hostname Calendar_Name]#mv .private .public
 

TIP# 3:  A sample backup script for a Webcal installation

#!/bin/bash
##TAR_FILE is where the SQL dump and webcal folder will be saved
##CurrTAR_FILE is a copy of the above that can be transferred to another server periodically
##DATA_FILE is where the SQL dump is saved
##STAT_FILE is where disk info and a listing of the saved files to keep track of disk space etc,.

TAR_FILE=/home/e-smith/files/ibays/webcalbackup/html/Webcal-`date +%H%M%S`-`date -I`.tar
CurrTAR_FILE=/home/e-smith/files/ibays/webcalbackup/html/currentwebcal.tar
DATA_FILE=/home/e-smith/files/ibays/webcalbackup/html/webcaldata.`date +%H%M%S`-`date -I`.sql
STAT_FILE=/root/webcalstat.txt

mysqldump --add-drop-table webcal > $DATA_FILE;
tar -cvf $TAR_FILE /opt/WebCal/ $DATA_FILE
cp $TAR_FILE $CurrTAR_FILE
ls /home/e-smith/files/ibays/webcalbackup/html/*.tar > $STAT_FILE
df >> $STAT_FILE
cat $STAT_FILE |mail -s WebcalBackUpStats admin@XXX.company.com

TIP# 4: A sample script to syncronize a Webcal installation

 

TIP# 5: 
Notes: