
ReadiVoice Administration & Maintenance Guide
108 Proprietary & Confidential
Scheduling Automatic Purges of CDR Records
To sc hed ul e
purgeCDR
to run periodically and automatically in the cron task
scheduler:
1Decide how many days you want to retain CDR records in the database.
Use this number as the argument of the
-n
option. If you’re not flagging
conferences as processed, specify the
-ip
option.
2Decide what the maximum CPU usage should be before the
purgeCDR
script suspends operation. Use this number as the argument of the
-m
option.
3For your records, write the command on the line below as you want it to
run. For instance, if you want to purge records more than 30 days old,
suspend the process when CPU usage exceeds 40%, and ignore the
processed flag, write the command as
purgeCDR -n 30 -m 40 -ip
.
_____________________________________________________
Don’t use the
-d
,
-i
, or
-v
options, which aren’t suitable for automatic
scheduling.
4Decide how often you want to run the purge process. We recommend a
frequency from weekly to daily, depending on your ReadiVoice system’s
conferencing and database usage.
5In the root user’s
crontab
file, schedule the command to run at the time
and frequency you want. See the Solaris documentation or the crontab
and cron man pages for information on scheduling tasks with cron.
Restoring Purged CDR Records
Should the need arise, you can restore purged CDRs to your database using
the
loadtable.pl
script referred to in “Restoring from a Manual Backup
Tape” on page 116.
To restore all the CDRs from an archive file created by
purgeCDR
:
1Open a Telnet session to the CACS as user cnow and switch user to root
(or log into the CACS as root and use an XTerm window).
2Change directories to
/rahome
and enter
./rastop
.
3Set the Informix environment by entering
tcsh
.
4Change directories to
/rahome/cdr/archives
and find the archive file
containing the records you want to restore (its name is
YYYYMMDDhhmmsscdr.log.gz
, where
YYYYMMDDhhmmss
is the run date of
the purge).
5Unzip the archive, extracting
YYYYMMDDhhmmsscdr.log
.