Last resort restore

From Bisq Wiki
Revision as of 15:58, 10 April 2023 by W000000t (talk | contribs)
Jump to navigation Jump to search

Sometimes it will happen that your Bisq instance won't start, and you don't have backups, or your backups do not start as well, or are too old to be useful. The following is to be intended as a hacky-workaround-last-resort-attempt to have Bisq start while retaining as much data as possible from the previous installation. In practical terms, it means that if something goes wrong with this guide and your machine explodes, you were warned and are the sole responsible for the event.

Test with a fresh data directory

First of all, make sure you have the latest version installed, and Bisq is closed (terminate orphan existing processes if any), then rename your data directory by changing Bisq to, for example, Bisq.old.
Start Bisq again: it should start into a 100% new instance, creating a brand new Bisq folder (if it doesn't, try uninstalling and then reinstalling Bisq).
Close Bisq again: we are going to use the freshly created Data Directory as a stump to populate with our old data.

Import raw data from backup

Open your renamed folder, get into the btc_mainnet/db folder, and sort files by "last modified" descending, you are looking for those files that were modified most recently, all of them in the same day (presumably the last day your Bisq was operational).
The list should include:
BsqSwapTrades
DisputeList
RefundDisputeList
SequenceNumberMap
MyVoteList
OpenOffers
MyBlindVoteList
ClosedTrades
MediationDisputeList
MyProposalList
MailboxMessageList
AccountAgeWitnessStore
PendingTrades
MyProofOfBurnList
PreferencesPayload
UserPayload
AddressEntryList
FailedTrades
MyReputationList
TempProposalStore
NavigationPath
UnconfirmedBsqChangeOutputList
IgnoredMailboxMap
PeerList
RemovedPayloadsMap
TradeStatistics3Store
SignedWitnessStore

Copy all the above files in the corresponding btc_mainnet/db folder of your fresh data directory, overwriting the existing ones.

Then, delete from the fresh data directory, and replace with copies from the old direcoty, the following folders:
btc_mainnet/keys
btc_mainnet/wallet
btc_mainnet/tor/hiddenservice

Cross your fingers, and start Bisq again hoping that everything, including the state of trades and disputes, has been restored;if not, this is a reversible step as you can simply restore the existing old folder after deleting the fresh one you created.