Author

Topic: How to skip a resync if your database gets corrupted (Bitcoin Core) (Read 633 times)

newbie
Activity: 21
Merit: 0
Quote from: RealBitcoin
C`mon who the hell uses windows 8.

Please do one for windows 7, otherwise its a good tutorial.

If you don't use windows 8 or Windows 10 you can just dump the bitcoin data directory manually or let a third-party tool do it for you. Thanks.

Quote from: ikydesu
Better to have an able how to use it on win7. Well this is good tutorial.

Same.

Quote
So, this method is can use continues right? X time is depends on when I open the wallet app right?

You define X time here
Quote
6. In that screen you will see more options like each how many time a copy should be created, when should old copies get deleted...
When more often you create copies, the chances of loosing more data are lower. Don't confuse this with any runtime enviroment.

Quote from: Amph
i just save the whole blockchain from a different time point, and reload those different saving is one is corrupted, much more easy and there is no trouble of any kind

That's more or less what FileHistory does for you automatically. This guides explains how to set FileHistory to do it. Most of the people can't be bothered to each X time create a copy manually.
legendary
Activity: 3248
Merit: 1070
i just save the whole blockchain from a different time point, and reload those different saving is one is corrupted, much more easy and there is no trouble of any kind
hero member
Activity: 686
Merit: 500
fb.com/Bitky.shop | Bitcoin Merch!Premium Quality!
Better to have an able how to use it on win7. Well this is good tutorial.
So, this method is can use continues right? X time is depends on when I open the wallet app right?
hero member
Activity: 854
Merit: 1009
JAYCE DESIGNS - http://bit.ly/1tmgIwK
C`mon who the hell uses windows 8.

Please do one for windows 7, otherwise its a good tutorial.
legendary
Activity: 2296
Merit: 1014
Thats actually first guide on how to skip resync. Was searching something like that many times Smiley first of a kind.
Don't have windows 8 tho :|
newbie
Activity: 21
Merit: 0
https://i.imgur.com/03xJ3ge.jpg?1

We all hate resyncs, no matter what you use Bitcoin Core for, Running an exchange, P2Pool, Trading... Resyncs will always make you loose time and maybe even money!
The most reasonable and easy way to prevent a resync is to create a security copy of the blockchain and the database. So if your database is corrupted right now, and you don't have a security copy, there is no (worth) way to skip a resync. However the blockchain is continuously getting updated with new blocks and transactions so you will have to create a new security copy each X time period. The problem is that you probably can't afford to loose time making those copies, so this guide will show you how to use FileHistory, a native Windows tool which will allow you to tell windows to create copies of the folders you choose into a external memory each X time.

For this you will need:
  • A system with Windows 8, Windows 8.1 or Windows 10
  • A external hard drive with enough space to hold several copies of the blockchain
If you don't have a system with the mentioned OS you can use a third-party security copy tool.
Footage is from a sapnish Windows 10 system. If you use Windows 8, process might be slightly different. Button names are in spanish, if you don't understand spanish, take the button place as reference.

How To Create Copies
1. To start you will need to open system configuration (https://i.imgur.com/1sEL3Bi.png?1)
2. Once there select "Update and Security" (https://i.imgur.com/7RCee1G.png)
3. Select the "Security Copy" tab (https://i.imgur.com/T6UfYHk.png)
4. Enable the switch button. You will be asked which location do you want to use to store copies, choose your external hard drive. (https://i.imgur.com/i80Ap6x.png)
5. Click "More Options" (https://i.imgur.com/iKjDnto.png)
6. In that screen you will see more options like each how many time a copy should be created, when should old copies get deleted... And which folders should get copied.
7. Click the "Add a folder" button (https://i.imgur.com/3tI6SVH.png) And select the bitcoin data directory (https://i.imgur.com/W7O8Dgi.png) Now you're here, select any other important folder you would like to get copied.

Done. Now your system should run security copies periodically in the background.

How To Restore a Copy
If you get your database corrupted, but fortunately you followed the "How to create copies" steps, not everything is lost, you can restore it! It's quickier than resyncing all the blockchain.

1. Find your bitcoin data directory.
2. Right click on it and select properties.
3. Select the "Previous Versions" tab (https://i.imgur.com/C1skErG.png).
You may find something like this instead https://i.imgur.com/rrf1wpl.png. If you get this, follow steps from 1 to 4 from "How to create copies" and then scroll the page down. There you will find "Restore Files from an Actual Security Copy" click it, a restore window will open, close the window and try again step 2 and 3
4. Find the last working security copy.
5. Select it and click restore.

Now it should start making a file copy operation. If you get prompted about what to do with dupe files choose to override the ones in the destination folder. Depending on how good is your computer, your hard drive, etc... it will take between half an hour or 2 hours to restore.

WARNING: Restoring a copy will delete all addresses and metadata which were created after the security copy you have choosen to restore. Be carefull about this.
Jump to: