Need help with transferring a pruned blockchain

4 replies 42 views
st4ke21Member
Posts: 29 · Reputation: 193
#1Sep 16, 2024, 07:07 PM
I've been using a pruned blockchain with bitcoin core version 26 without problems. I moved the blocks and chainstate folders along with the wallet.dat file to a different computer. But now, when I launch bitcoin core, it says I have to reindex the blockchain, which means it will redownload everything. Isn't this how you should be able to copy a pruned blockchain?
2 Reply Quote Share
coin_sigmaLegendary
Posts: 1275 · Reputation: 5553
#2Sep 17, 2024, 01:23 AM
Pruned setup still needs the latest blocks that is it tells you to run Bitcoin core with -reindex. If I were you since it's pruned instead of copying the downloaded blockchain, I suggest to remove the blocks and chainstate folder and let the Bitcoin core sync and download the latest blocks if the prune size is not that big.
2 Reply Quote Share
BasedGasHero Member
Posts: 460 · Reputation: 2335
#3Sep 18, 2024, 07:14 PM
Yes, it will work, but when qt requires reindexing the software is not accessing the filed properly or some part of the copied file is corrupted. Check the bitcoin.conf is in the right directory where you copied the blockchain file. And also check the pruning value is same as the value where you copied.
2 Reply Quote Share
st4ke21Member
Posts: 29 · Reputation: 193
#4Sep 19, 2024, 12:26 AM
i mostly use linux but wanted a copy on a Windows machine in case a family member needed to access it since linux would be totally foreign to them.  I'm laughing now because it probably doesn't matter what OS it's on.  Bitcoin will harder to explain to them than linux   Anyway, i had the blockchain on another hard drive separate from the Windows OS that just had files/documents on it (formatted as NTFS too).  I did have that location in the config file.  So from the comments here i decided to just move the blockchain files to the Windows default location and now Bitcoin is running without a problem with the pruned blockchain. A little annoyed it didnt work the way I wanted it, but I'll call it a win nonetheless.
3 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#5Sep 19, 2024, 04:22 AM
That's because if the settings are all originally in "bitcoin.conf" file inside the default bitcoin datadir, you should also put that config file in the default bitcoin data directory of the other machine and put the datadir files in the custom data directory (datadir=) that you've set, Linux and Windows have different path formats so make sure to edit it accordingly. When staring Core, do not set the data directory using the 'Welcome Screen' for it to read the config file in the default datadir. On the other hand, if you've originally set the custom data directory and prune settings in the Welcome Screen, You should also set those settings in the Bitcoin Core in your other machine's Welcome Screen, then put the datadir files in that custom datadir including the bitcoin.conf inside it. (in this case, it wont create anything in the default datadir unless you use bitcoind without --datadir arg) Putting the datadir files inside the default will also work as long as you don't set the datadir in the Welcome Screen, set prune setting there if it's not in the config file. In Pruned mode, performing a -reindex will trigger a download of the entire blockchain from scratch, not just the latest blocks. Deleting the "blocks" folder will delete the blockchain itself, and you knw what will happen. Deleting the chainstate will require the node to reindex-chainstate to rebuild it and since it's in pruned mode, it will have to redownload all the blocks to do that. Pruned mode isn't a setting to download just the target size, it also downloads and verify all the blocks then delete the older already-verified ones to accommodate the target size.
0 Reply Quote Share

Related topics