Bitcoin Forum
May 01, 2024, 11:51:32 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: The chainstate and blocks directories  (Read 116 times)
oppiet30 (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 02, 2023, 02:54:09 AM
 #1

Can I copy these two directories from a windows computer and copy them to a linux computer and bitcoind can still read them?
I have more blocks downloaded on the windows computer and I want to get the linux box caught up without downloading any blocks from the net. Or is there a simpler way to do this?
1714607492
Hero Member
*
Offline Offline

Posts: 1714607492

View Profile Personal Message (Offline)

Ignore
1714607492
Reply with quote  #2

1714607492
Report to moderator
1714607492
Hero Member
*
Offline Offline

Posts: 1714607492

View Profile Personal Message (Offline)

Ignore
1714607492
Reply with quote  #2

1714607492
Report to moderator
1714607492
Hero Member
*
Offline Offline

Posts: 1714607492

View Profile Personal Message (Offline)

Ignore
1714607492
Reply with quote  #2

1714607492
Report to moderator
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714607492
Hero Member
*
Offline Offline

Posts: 1714607492

View Profile Personal Message (Offline)

Ignore
1714607492
Reply with quote  #2

1714607492
Report to moderator
1714607492
Hero Member
*
Offline Offline

Posts: 1714607492

View Profile Personal Message (Offline)

Ignore
1714607492
Reply with quote  #2

1714607492
Report to moderator
1714607492
Hero Member
*
Offline Offline

Posts: 1714607492

View Profile Personal Message (Offline)

Ignore
1714607492
Reply with quote  #2

1714607492
Report to moderator
garlonicon
Hero Member
*****
Offline Offline

Activity: 801
Merit: 1932


View Profile
August 02, 2023, 04:30:13 AM
Merited by vapourminer (1), odolvlobo (1), ABCbits (1)
 #2

Short answer: yes, you can copy those files.

I did it on my nodes. I have full blockchain on some external drive, and any operating system can easily read it, if you point your Bitcoin Core into the right directory during startup.
oppiet30 (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 02, 2023, 04:40:23 AM
 #3

Do I need to copy both folders or just one of them?
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
August 02, 2023, 04:44:30 AM
Last edit: August 02, 2023, 07:48:22 AM by ranochigo
 #4

Both. Bitcoin Core requires both to function.

When you start up bitcoind on Linux, you won't have to synchronize or validate from the start but you do have to ensure that Bitcoin Core is properly shut down on Windows before copying it over. Don't copy any sensitive files like wallet.dat. It'll probably be more efficient if you synchronize on the faster computer before copying it over.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
DaveF
Legendary
*
Offline Offline

Activity: 3458
Merit: 6258


Crypto Swap Exchange


View Profile WWW
August 02, 2023, 10:38:57 AM
Merited by Accardo (1), garlonicon (1)
 #5

If you are taking the files and doing a copy and paste you are fine.
If you are putting the files on an external drive and having the linux box use them, do not forget to make sure your permissions are correct.

99% of the time it's fine but every once in a while there is an issue
Been there...done that....

As others have said make sure it's just those 2 folders and not anything else.

Obviously also make sure that bitcoin is not running on the windows machine when you copy the files. Yes, I know it's obvious, and someone here (reddit?) a few years ago also had an issue when it didn't fully shutdown and they could not figure out what happened. Turned out that something was grabbing the bitcoin app on the windows machine so it never closed properly.

-Dave

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Accardo
Hero Member
*****
Offline Offline

Activity: 1078
Merit: 509


Leading Crypto Sports Betting & Casino Platform


View Profile
August 02, 2023, 12:41:21 PM
Last edit: August 02, 2023, 12:51:31 PM by Accardo
Merited by ranochigo (2), garlonicon (1)
 #6


I have full blockchain on some external drive, and any operating system can easily read it, if you point your Bitcoin Core into the right directory

Did you split the data directory into different drives to improve chainstate access speed? just figured here that splitting can help the access speed of the chainstate especially when the data directory is stored on a magnetic drive. Though it's a good advise to copy both files, but, in some cases, it's not the only possible alternative.

Or is there a simpler way to do this?

Pruning can be simpler and wouldn't require you much procedures or explainations, you can add prune =550 to the bitcoin.conf, I'm suggesting this because it seems you are not abandoning the windows OS entirely to use linux to run your full node.


..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
August 02, 2023, 02:03:25 PM
 #7

Pruning can be simpler and wouldn't require you much procedures or explainations, you can add prune =550 to the bitcoin.conf, I'm suggesting this because it seems you are not abandoning the windows OS entirely to use linux to run your full node.
If you're using different wallets, you cannot do this. Pruning also means that you cannot import a different wallet into your Linux instance without a complete resynchronization.


.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Accardo
Hero Member
*****
Offline Offline

Activity: 1078
Merit: 509


Leading Crypto Sports Betting & Casino Platform


View Profile
August 02, 2023, 03:43:18 PM
 #8

Pruning can be simpler and wouldn't require you much procedures or explainations, you can add prune =550 to the bitcoin.conf, I'm suggesting this because it seems you are not abandoning the windows OS entirely to use linux to run your full node.
If you're using different wallets, you cannot do this. Pruning also means that you cannot import a different wallet into your Linux instance without a complete resynchronization.



Considering that when pruning was introduced in 0.11.0 it had no wallet until 0.12, I thought it'll be possible to have this issue solved in later versions, but I found on this thread where you and other members explained in detail why such feature won't be expected. Without full resynchronization when adding new wallet, it's meaningless to call it prune. The concept of prune is to eradicate massive storage consumption. So, adding or importing different wallet shouldn't be a priority to users who have prune enabled, as they should know, to create enough space, that a lot of blocks including the genesis block won't be saved on the disk. I think prune users should be prepared to insert the right wallet before pruning in the first place.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
garlonicon
Hero Member
*****
Offline Offline

Activity: 801
Merit: 1932


View Profile
August 03, 2023, 04:44:40 AM
 #9

Quote
Did you split the data directory into different drives to improve chainstate access speed?
Not yet, but this is a good link, and I will think about it. For me, it is more important to split the wallet than chain-related directories, because this is related to security, while blocks and chainstate are related only to performance.

But I use huge SSDs, for example 2 TB or 4 TB, so performance is quite good. The biggest bottleneck is verification time. If I run two offline clients on localhost, it takes similar time to synchronize for example some pruned node from some full node.
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!