Author

Topic: How to reinstall bitcoin core, but keeping the blockchain? (Read 201 times)

jr. member
Activity: 43
Merit: 25
Too technical for me, I will try what you said, I hope that it will work. Thank you!
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
In bitcoin core installer there are 2 directory to choose, 1 for btc core and 1 for blockchain (if I remember correctly). I don't know if you consider it as "Welcome screen" or the actual installer.
Here's what the GUI's "Welcome Screen" looks like (The title bar has "Welcome" on it):


It will only appear the first time your launched the GUI or if you add --choosedatadir arg to bitcoin-qt.
It only has the datadir and prune settings.
Perhaps you remembered setting the installation directory in the installer then saw the welcome screen when your launched Bitcoin Core.

Anyways, selecting the previous data usually works and will continue where it left
but since it didn't in your case, you might have conflicting options in your bitcoin.conf file in the selected directory or the default datadir in the previous installation.
Bitcoin Core read specific .conf file(s) and prioritizing conflicting options depending on how it was set up,
For example: data directory with pruned blockchain but set the new installation without 'prune' settings.
jr. member
Activity: 43
Merit: 25
Thanks for explaining step by step!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Will I lose the blockchain?
No. Just copy the application data to linux and run Bitcoin Core there.

Does anybody know how to proper uninstall bitcoin core (windows format) and reinstall it in linux format, but not the app starting to download the blockchain again?
Backup your application data, which is located in %APPDATA%\Bitcoin IIRC, to some external drive. Open up linux, install Bitcoin Core, let it run for a couple of minutes to start downloading blocks. Close it, replace the backed up Bitcoin app data to ~/.bitcoin, and restart Bitcoin Core. It will continue from where you left it at Windows.
jr. member
Activity: 43
Merit: 25
In bitcoin core installer there are 2 directory to choose, 1 for btc core and 1 for blockchain (if I remember correctly). I don't know if you consider it as "Welcome screen" or the actual installer. But choosing the directory for blockchain where it is already installed won't work, it will download it again, maybe it overwrites it.

Thank y'all for the information Smiley
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
I use Bitcoin Core just to run a full node.
So I have to write the path to that directory in the bitcoin.conf file.
I thought choosing that path in the installer was enough.
Do you mean the "Welcome Screen" or the actual Bitcoin Core installer?
Because the directory indicated in the latter is where the binaries will be saved, it's not the data directory that Bitcoin Core will use.

On the other hand, you can indicate the data directory in the GUI's "Welcome Screen" but it will only be used by bitcoin-qt.
bitcoind will still use the default unless indicated in -datadir arg on in the default data dir's bitcoin.conf file.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
Don't forget there may be permissions issues. (been there done that)

Also, core may want to rescan the entire blockchain if that installation of core was not the last one to touch it.

If you are going to keep dual booting windows & linux make sure that they are both on the same version of core. If you update one and not the other and open bad things, or at least annoying things, will happen.

-Dave
hero member
Activity: 714
Merit: 1298

So I have to write the path to that directory in the bitcoin.conf file.
I thought choosing that path in the installer was enough.
Thanks for your answers!

Choosing path in the installer tells OS where to install  BitcoinCore. The path to folder where it keeps blockchain may be different from default one. In your case you want to use blockchain copy which is already in some directory on you hard drive. Thus, you need to specify that directory in bitcoin.conf file

datadir=

# For instance my path looks like this datadir=F:/ BitcoinData where F is my external SSD.
jr. member
Activity: 43
Merit: 25
I don't remember about pruned blockchain, maybe it was just a curiosity.
I use Bitcoin Core just to run a full node.
So I have to write the path to that directory in the bitcoin.conf file.
I thought choosing that path in the installer was enough.
Thanks for your answers!
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Once, I deleted the bitcoin core, kept the blockchain, reinstalled the bitcoin core and chose the same folders, but the blockchain started to re-download, although it was already on my computer.
I saw one of your thread inquiring about "pruned blockchain".
Was this happened in that laptop with Bitcoin Core that has "prune block storage to" setting?

Because if it was, it's not just the correct data directory that you need to set to the new installation but the prune setting as well.
hero member
Activity: 714
Merit: 1298
Hello everyone!
I've changed my computer, and I will make some changes.
On my SSD (240 GB), I will have both windows and linux (dual boot).
Linux will be my main system, so I want to install the bitcoin core in linux format.
Currently I've bitcoin core on my HDD, but it is windows format (.exe).
I want to uninstall and reinstall it, but this time in linux format.

Will I lose the blockchain?
Once, I deleted the bitcoin core, kept the blockchain, reinstalled the bitcoin core and chose the same folders, but the blockchain started to re-download, although it was already on my computer.

Does anybody know how to proper uninstall bitcoin core (windows format) and reinstall it in linux format, but not the app starting to download the blockchain again?

Thank you!


If your HDD keeps all volume of the  current blockchain (i.e files pertaining to  LevelDB of BitcoinCore) in some directory then, after reinstalling BitcoinCore on Linux, you should put down into bitcoin.conf the  entry that shows the path to that  directory to not lose  the copy of blockchain you have. Otherwise the sync procedure of BitcoinCore node on your Linux will start from the scratch.
jr. member
Activity: 43
Merit: 25
Hello everyone!
I've changed my computer, and I will make some changes.
On my SSD (240 GB), I will have both windows and linux (dual boot).
Linux will be my main system, so I want to install the bitcoin core in linux format.
Currently I've bitcoin core on my HDD, but it is windows format (.exe).
I want to uninstall and reinstall it, but this time in linux format.

Will I lose the blockchain?
Once, I deleted the bitcoin core, kept the blockchain, reinstalled the bitcoin core and chose the same folders, but the blockchain started to re-download, although it was already on my computer.

Does anybody know how to proper uninstall bitcoin core (windows format) and reinstall it in linux format, but not the app starting to download the blockchain again?

Thank you!
Jump to: