Obviously it would be different for Jd but:
Code:
echo "rebuilding the character database, MAKE SURE SERVER IS OFF"
cd /PWServer/gamedbd/
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/auction -d /dbf/dbdata/auction
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/base -d /dbf/dbdata/base
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/city -d /dbf/dbdata/city
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/clsconfig -d /dbf/dbdata/clsconfig
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/config -d /dbf/dbdata/config
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/factioninfo -d /dbf/dbdata/factioninfo
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/factionname -d /dbf/dbdata/factionname
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/friends -d /dbf/dbdata/friends
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/gtask -d /dbf/dbdata/gtask
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/inventory -d /dbf/dbdata/inventory
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/mailbox -d /dbf/dbdata/mailbox
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/messages -d /dbf/dbdata/messages
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/order -d /dbf/dbdata/order
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/rolename -d /dbf/dbdata/rolename
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/sellpoint -d /dbf/dbdata/sellpoint
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/shoplog -d /dbf/dbdata/shoplog
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/status -d /dbf/dbdata/status
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/storehouse -d /dbf/dbdata/storehouse
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/task -d /dbf/dbdata/task
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/translog -d /dbf/dbdata/translog
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/user -d /dbf/dbdata/user
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/userfaction -d /dbf/dbdata/userfaction
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/waitdel -d /dbf/dbdata/waitdel
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/auction -d /dbf/dbdata/auction
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/equiptment -d /dbf/dbdata/equiptment
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/equipment -d /dbf/dbdata/equipment
sleep 5
cd /dbf/
TIME=`date +%B%d--%k:%M`
mv dbhomewdb /mnt/sata/dbf/$TIME-CORRUPT
mkdir dbhomewdb
mv dbdata dbhomewdb/dbdata
mkdir dbdata
cd /dbf/dbhomewdb/
mkdir dblogs
echo "character database is now rebuilt."