Tutorial how to fix database corrupted

Junior Spellweaver
Joined
Apr 9, 2012
Messages
120
Reaction score
36
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/
Code:
echo "rebuilding the character database, MAKE SURE SERVER IS OFF"
cd /PWServer/gamedbd/
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/auction -d /PWServer/gamedbd/dbdata/auction
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/base -d /PWServer/gamedbd/dbdata/base
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/city -d /PWServer/gamedbd/dbdata/city
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/clsconfig -d /PWServer/gamedbd/dbdata/clsconfig
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/config -d /PWServer/gamedbd/dbdata/config
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/factioninfo -d /PWServer/gamedbd/dbdata/factioninfo
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/factionname -d /PWServer/gamedbd/dbdata/factionname
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/factionfortress -d /PWServer/gamedbd/dbdata/factionfortress
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/friends -d /PWServer/gamedbd/dbdata/friends
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/gtask -d /PWServer/gamedbd/dbdata/gtask
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/inventory -d /PWServer/gamedbd/dbdata/inventory
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/mailbox -d /PWServer/gamedbd/dbdata/mailbox
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/messages -d /PWServer/gamedbd/dbdata/messages
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/order -d /PWServer/gamedbd/dbdata/order
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/rolename -d /PWServer/gamedbd/dbdata/rolename
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/sellpoint -d /PWServer/gamedbd/dbdata/sellpoint
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/shoplog -d /PWServer/gamedbd/dbdata/shoplog
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/status -d /PWServer/gamedbd/dbdata/status
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/storehouse -d /PWServer/gamedbd/dbdata/storehouse
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/task -d /PWServer/gamedbd/dbdata/task
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/translog -d /PWServer/gamedbd/dbdata/translog
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/user -d /PWServer/gamedbd/dbdata/user
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/userfaction -d /PWServer/gamedbd/dbdata/userfaction
sleep 5
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/waitdel -d /PWServer/gamedbd/dbdata/waitdel
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/auction -d /PWServer/gamedbd/dbdata/auction
./dbtool dbtool -r -s /PWServer/gamedbd/dbhomewdb/dbdata/equipment -d /PWServer/gamedbd/dbdata/equipment
sleep 5

cd /PWServer/gamedbd/
TIME=`date +%B%d--%k:%M`
cd /PWServer/gamedbd/
mkdir dblogs

echo "character database is now rebuilt."

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/
if you have any problem in this you may ask here
===============================================================================
the script made by rbb138 and said:
This script will not work for 1.4.5, it was made by me 3 years ago for 1.2.6
Use the new one wanmei made, its inside srcfiles/gamedbd/

remade to work with all server by ragezone works 100%
 
Last edited:
Again, this is my script....

This script will not work for 1.4.5, it was made by me 3 years ago for 1.2.6
Use the new one wanmei made, its inside srcfiles/gamedbd/
 
Last edited:
This one work 100% cuz the fixing tool is >>dbtool and already tested more time..
 
Last edited:
It will not fix the extra tables that 1.4.5 has such as factionfortress.
Use my new one:

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/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."
 
that was an example.. obviously theres more than just that one
 
no, this data is set in stone when the item is crafted.
 
there are a lot of grammar mistakes, I can't understand those 2 lines:

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

Step 4 Delete the dblogs into /yourpwserver/gamedbd/
 
hey man, do this

first copy the script and create a file named fix.sh on /PWServer/gamedbd/

go to gamedbd and create a folder called dbhomewdb
move your actually folder dbdata to dbhomewdb
create a new folder called dbdata on /PWServer/gamedbd/
delete the folder named dblogs on /PWServer/gamedbd/

run the script
 
Hello, I implemented the solution and it was perfect, but I lost the account stash of accounts that enabled him, anyone knows how to fix this?
 
Back