Bitcoin Forum
May 13, 2024, 01:43:07 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Change location of database (Linux ARM CLI)  (Read 80 times)
crystal-love (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 5


View Profile
January 08, 2021, 01:34:49 PM
Merited by LoyceV (4), ABCbits (1)
 #1

Hello,
The installation of btc core, put's the program (as well as all 350GB) on the main disk, while doing installation:

sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.20.1/bin/*


But i believe, after installation there should be a configuration file somewhere, so i could point all database to the external drive, while keeping the program on the boot drive.

How do i do that?

Thank you
1715564587
Hero Member
*
Offline Offline

Posts: 1715564587

View Profile Personal Message (Offline)

Ignore
1715564587
Reply with quote  #2

1715564587
Report to moderator
1715564587
Hero Member
*
Offline Offline

Posts: 1715564587

View Profile Personal Message (Offline)

Ignore
1715564587
Reply with quote  #2

1715564587
Report to moderator
1715564587
Hero Member
*
Offline Offline

Posts: 1715564587

View Profile Personal Message (Offline)

Ignore
1715564587
Reply with quote  #2

1715564587
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715564587
Hero Member
*
Offline Offline

Posts: 1715564587

View Profile Personal Message (Offline)

Ignore
1715564587
Reply with quote  #2

1715564587
Report to moderator
1715564587
Hero Member
*
Offline Offline

Posts: 1715564587

View Profile Personal Message (Offline)

Ignore
1715564587
Reply with quote  #2

1715564587
Report to moderator
1715564587
Hero Member
*
Offline Offline

Posts: 1715564587

View Profile Personal Message (Offline)

Ignore
1715564587
Reply with quote  #2

1715564587
Report to moderator
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
January 09, 2021, 02:22:09 AM
Last edit: November 15, 2023, 12:24:15 AM by HCP
Merited by LoyceV (4), ABCbits (1)
 #2

When bitcoin-qt is first run, it should automatically create a .bitcoin directory in the users "home" directory aka ~/.bitcoin and it should prompt to ask where to set the datadir to. If you've already used that, you can try a couple of things to "move" the datadir:

In the .bitcoin directory, if you create a "bitcoin.conf" file... you can add the datadir option and set that to where you want the blocks stored...
Code: (bitcoin.conf)
datadir=full/path/to/your/bitcoin/datadir

Alternatively, simply start bitcoin-qt using the "-choosedatadir" option... it'll prompt you again to choose where you want the datadir to be set to.
Code:
bitcoin-qt -choosedatadir



NOTE: be wary of the "discard blocks after verification" (prune) option... that could cause problems later if you need to import private keys or rescan/reindex. I would suggest leaving it "UNCHECKED" if you have the storage space to store the full blockchain (350+gigs)


Also note that neither of these options will "move" the current contents of the datadir to the new location... so bitcoin core will start syncing from block 0 again.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16654


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
January 09, 2021, 11:22:46 AM
Merited by NeuroticFish (1)
 #3

I just use a symlink for my blocks-directory. This keeps chainstate on my SSD, and puts blocks on my (much larger) HDD.
Note: don't move the blocks directory while Bitcoin Core is running.

NeuroticFish
Legendary
*
Offline Offline

Activity: 3668
Merit: 6388


Looking for campaign manager? Contact icopress!


View Profile
January 09, 2021, 03:21:00 PM
 #4

I just use a symlink for my blocks-directory. This keeps chainstate on my SSD, and puts blocks on my (much larger) HDD.
Note: don't move the blocks directory while Bitcoin Core is running.

I agree with LoyceV.
If you use the HDD for all the data, the sync will get much slower. Using symlink only for blocks will fix that.
I've done that myself although only temporarily, for tests.

If you go for external HDD, make sure your Bitcoin wallet is fully stopped when you add or remove the disk (this at least stands for Windoze, but nowadays this may be a problem for Linux too), in order to not risk invalid data.

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

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

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

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

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

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











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











▄▄▄▄█
crystal-love (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 5


View Profile
January 10, 2021, 05:56:24 PM
 #5

When bitcoin-qt is first run, it should automatically create a .bitcoin directory in the users "home" directory aka ~/.bitcoin and it should prompt to ask where to set the datadir to. If you've already used that, you can try a couple of things to "move" the datadir:

I'm using CLI version, so there was no prompt as it is in the GUI version. As well it did not asked me during the "installation" Smiley
So i will try "-choosedatadir" option" or bitcoin.conf (the one i was looking for), but looks like i have to create it by my self.

crystal-love (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 5


View Profile
January 10, 2021, 06:04:04 PM
 #6

I just use a symlink for my blocks-directory. This keeps chainstate on my SSD, and puts blocks on my (much larger) HDD.
Note: don't move the blocks directory while Bitcoin Core is running.

This solution sounds even better Smiley
T.Y.
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!