![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
Topic Title: ccm repair script Topic Summary: ccm repair cron fails Created On: 7-Jul-2006 14:56 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I have the following ksh that runs weekly, but keeps failing with the following error!
Usage: ccmdb repair <database_path> -t|-repair_index <tablename>|<indexname>|<"">[-y] or ccmdb repair <database_path> -t|-repair_table <tablename> [-y] =========== The script is as follows: ======================================= #!/usr/bin/ksh # # Program: ccm.repair_index # # # VARIABLES DECLARATION # export CCM_HOME=/usr/local/ccm63 export PATH=$PATH:$CCM_HOME/bin:/bin:/usr/bin:/usr/local/bin:/etc export database_dir="/data/ccm_db" export script_dir="/home/ccm_root/Scripts" # # FUNCTIONS DECLARATION # function start { $script_dir/start_session $1 # this starts the ccm database session echo "">> .status echo "">> .status } function end { $script_dir/stop_session # this stops the ccm database session } function repair_index { ccmdb repair $1 -repair_index "" if [ "$?" -eq 0 ] then echo repair_index check on $1 ran successfully else echo repair_index check on $1 failed fi } # # MAIN PROGRAM # date > .status ls $database_dir | while read database do if [ $database != "lost+found" ] then echo "*********************************************" >> .status echo "">> .status start ${database} >> .status ccmdb repair ${database} -repair_index >> .status end >> .status fi done cat .status >> /data/ccm_log/repair_index`date'+%%Y%%m%d'`.log # # CLEANUP # rm .status find /data/ccm_log -atime +30 -name "repair_index" -exec rm {}\; ====================================================================== Any comments, suggestions, for this script would be greatly appreciated...... This is a Script that runs in a crontab at 12:00am every Sunday after the fscheck script. Thanks in advance....... Cheers..... Dan Schulz Computer Systems Analyst - EKM Communications Security Establishment. Ottawa, Ontario. Dan.Schulz@cse-cst.gc.ca |
|
![]() |
Telelogic SYNERGY
» SYNERGY/CM
»
ccm repair script
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.