Bitcoin Forum
November 06, 2024, 07:31:18 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to reinstall bitcoin core, but keeping the blockchain?  (Read 199 times)
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 25


View Profile
September 28, 2023, 04:01:41 AM
Merited by hugeblack (2)
 #1

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!
satscraper
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1633



View Profile
September 28, 2023, 05:59:24 AM
Merited by ABCbits (1)
 #2

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.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6332


Self-proclaimed Genius


View Profile
September 28, 2023, 07:15:45 AM
 #3

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 25


View Profile
September 28, 2023, 10:39:52 AM
 #4

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!
satscraper
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1633



View Profile
September 28, 2023, 11:04:31 AM
 #5


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=<path to directory on  where Bitcoin Core will keep its data>

# For instance my path looks like this datadir=F:/ BitcoinData where F is my external SSD.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
DaveF
Legendary
*
Offline Offline

Activity: 3654
Merit: 6660


Crypto Swap Exchange


View Profile WWW
September 28, 2023, 01:36:04 PM
 #6

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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6332


Self-proclaimed Genius


View Profile
September 28, 2023, 02:14:18 PM
 #7

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 25


View Profile
September 30, 2023, 03:48:11 PM
 #8

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
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1694
Merit: 8324


Bitcoin is a royal fork


View Profile WWW
September 30, 2023, 04:51:01 PM
 #9

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 25


View Profile
September 30, 2023, 08:44:59 PM
 #10

Thanks for explaining step by step!
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6332


Self-proclaimed Genius


View Profile
October 01, 2023, 04:36:30 AM
Merited by ABCbits (1)
 #11

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 25


View Profile
October 06, 2023, 04:23:08 AM
 #12

Too technical for me, I will try what you said, I hope that it will work. Thank you!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!