I'm having wallet issues as well. I get the following error
Critical error loading wallet "reset" from wallet-reset.dat: CDB() : cant open
database file wallet-reset.dat, error 22
I had renamed this wallet file a long time ago when doing some coin cleanup to rest all my stakes into one large chunk. I can't seem to get this to work, and google isnt helping. Any tips how to remedy an error 22? thanks
Critical error loading wallet "reset" from wallet-reset.dat: CDB() : cant open
database file wallet-reset.dat, error 22
I had renamed this wallet file a long time ago when doing some coin cleanup to rest all my stakes into one large chunk. I can't seem to get this to work, and google isnt helping. Any tips how to remedy an error 22? thanks
There is no easy way currently to run salvagewallet on a secondary wallet .If you have a wallet-reset.dat backup, try using that one instead. If not try these steps below.
1) Shutdown client
2) rename wallet.dat to noloadwallet.dat
3) rename wallet-reset.dat to wallet.dat
4) Startclient with -salvagewallet
5) Be patient, after fixing keys, it will rescan 5million blocks, this can take a fair amount of time. Possibly hours depending on your computer.
6) After complete, shutdown client
7) rename your wallet.dat (previously wallet-reset.dat) back to wallet-reset.dat
![Cool](https://bitcointalk.org/Smileys/default/cool.gif)
9) start client up
10) do more frequent wallet backups!
You can alway monitor that progress by looking at the debug.log file.
I will work on adding an extra switch to salvagewallet to work on a secondary wallet For version 1.6.
Edit: If you are good with startups switches you can also also do this to save time.
1) Shutdown client
2) Create new dir called C:\hbn_fix
3) copy wallet-reset.dat to c:\hbn_fix\wallet.dat
4) startup client with -salavgewallet -datadir=c:\hbn_fix
5) After client is done and wallet is working, shut it down.
6) rename your wallet-reset.dat in your normal datadir %appdata% to brokewallet-reset.dat
7) Copy your wallet.dat form c:\hbn_fix to your normal datadir as wallet-reset.dat
This method may save a bit of time.
This is what happens whenever I have tried to -salvagewallet this one
2017-07-14 19:52:55 Renamed wallet.dat to wallet.1500061975.bak
2017-07-14 19:52:55 Error: Salvage found errors, all data may not be recoverable.
2017-07-14 19:52:55 Salvage(aggressive) found no records in wallet.1500061975.bak.
2017-07-14 19:54:03 Failed to rename wallet.dat to wallet.1500062043.bak
and the client exits. I gave up before when this happened because I couldnt figure it out. Is it doing this because the wallet was encrypted?
also, db.log gives me a bunch of errors. heres the last one
wallet.1488662875.bak: DB_VERIFY_BAD: Database verification failed
file unknown has LSN 359/6987529, past end of log at 71/4537095
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment