Pages

Fix Corrupted Database Perfect World

Tutorial how to fix database corrupted
this Tutorial Work 100% and without deleting anything how to fix the database corrupted

Step 1 Create file :fix.sh into /yourpwserver/gamedbd/
and copy this cord and past into fix.sh and change /PWServer/gamedbd/dbhomewdb/ to
/yourpwserver/gamedbd/dbhomewdb/
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/factionfortress -d /dbf/dbdata/factionfortress
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/factionrelation -d /dbf/dbdata/factionrelation
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/friends -d /dbf/dbdata/friends
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/friendext -d /dbf/dbdata/friendext
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/force -d /dbf/dbdata/force
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/gtask -d /dbf/dbdata/gtask
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/serverdata -d /dbf/dbdata/serverdata
./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
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/syslog -d /dbf/dbdata/syslog
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
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/userstore -d /dbf/dbdata/userstore
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/equipment -d /dbf/dbdata/equipment
sleep 5
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/webtrade -d /dbf/dbdata/webtrade
./dbtool dbtool -r -s /dbf/dbhomewdb/dbdata/webtradesold -d /dbf/dbdata/webtradesold

cd /dbf/
TIME=`date +%B%d--%k:%M`
mv dbhomewdb /dbf/backups/$TIME-CORRUPT
mkdir dbhomewdb
mv dbdata dbhomewdb/dbdata
mkdir dbdata
cd /dbf/dbhomewdb/
mkdir dblogs

echo "character database is now rebuilt."
mkdir dbhomewdb/data.fix
ls dbhomewdb/dbdata/ | awk '{ print "./dbtool -r -s dbhomewdb/dbdata/"$1" -d dbhomewdb/data.fix/"$1 /bin/sh
rm -fr dbhomewdb/dbdata
rm -fr dbhomewdb/dblogs/*
mv dbhomewdb/data.fix dbhomewdb/dbdata
step 2 create folder :dbhomewdb
and move your old dbdata into /yourpwserver/gamedbd/dbhomewdb/

Step 3 create new folder :dbdata into /yourpwserver/gamedbd/ the folder must be empty

Step 4 Delete the dblogs into /yourpwserver/gamedbd/

Step 5 give permission 777 to fix.sh
and type the command: cd /yourserver/gamedbd/
./fix.sh

after done reboot the server then check it
if is ok them delete or backup your old data into /yourpwserver/gamedbd/dbhomewdb/

gost0
rbb138
hrace009
Ragezone