Bitcoin Forum
May 05, 2024, 07:10:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need help--Moving blockchain to SD card on Linux  (Read 1675 times)
xcsler (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100



View Profile
June 10, 2013, 12:07:31 AM
 #1

I moved my "blocks" and "chainstate" folders to a 64GB card.
How do I tell BitcoinQt that the files are there and not to redownload the entire blockchain?
I'm using Linux.
Thanks.
1714936259
Hero Member
*
Offline Offline

Posts: 1714936259

View Profile Personal Message (Offline)

Ignore
1714936259
Reply with quote  #2

1714936259
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
June 10, 2013, 12:18:06 AM
 #2

the blockchain database can't be transferred between computers. they must be "detached" first. to do that, run bitcoin with "-detachdb=1" and exit. then you should be able to copy+paste your entire /.bitcoin/ directory.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
xcsler (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100



View Profile
June 10, 2013, 12:28:03 AM
 #3

the blockchain database can't be transferred between computers. they must be "detached" first. to do that, run bitcoin with "-detachdb=1" and exit. then you should be able to copy+paste your entire /.bitcoin/ directory.

Sorry I forgot to add that I'm not that tech savvy.
So, I go into the config file and make the detachdb=1 change and then restart bitcoinqt?
How do I let the client know where to find the data after I detach it?

Also, I have already cut and pasted the data prior to detaching it.
Does this mean I have to redownload the blockchain?  Sad
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
June 10, 2013, 12:49:50 AM
 #4

you're using linux, so you have to execute (on the machine that the blocks came from):
Code:
./bitcoind -detachdb=1 &
./bitcoind stop
alternately:
Code:
./bitcoin-qt -detachdb=1
then exit the qt interface

after you have done this, the block database will be "detached" from the system. this means it can be moved to any other computer without issue. at the machine that you moved the blocks to, you may start bitcoin normally and resume operation as usual. if you have different wallets, you may need to run bitcoin with "-rescan=1".

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
SnitraM
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
June 10, 2013, 10:27:44 AM
 #5

After detaching the db as the other post tell you and recopying the files, then if you want to actually use
the files on the card instead of copying them to ~/.bitcoin/, run "bitcoind -h" and look at all the options.

I think the one you want is "-datadir=<dir>".

Remember if you plan on using the card on different bitcoin clients you'd need to always use the
-detachdb option.
kodo
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile
June 12, 2013, 10:51:49 PM
 #6

Are you still experiencing this problem?
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
June 12, 2013, 10:58:47 PM
 #7

After detaching the db as the other post tell you and recopying the files, then if you want to actually use
the files on the card instead of copying them to ~/.bitcoin/, run "bitcoind -h" and look at all the options.

I think the one you want is "-datadir=<dir>".

Remember if you plan on using the card on different bitcoin clients you'd need to always use the
-detachdb option.

Beware, -datadir will search/put all the files of .bitcoin on the SD, including wallet.dat

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
xcsler (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100



View Profile
June 19, 2013, 01:43:12 AM
 #8

you're using linux, so you have to execute (on the machine that the blocks came from):
Code:
./bitcoind -detachdb=1 &
./bitcoind stop
alternately:
Code:
./bitcoin-qt -detachdb=1
then exit the qt interface

after you have done this, the block database will be "detached" from the system. this means it can be moved to any other computer without issue. at the machine that you moved the blocks to, you may start bitcoin normally and resume operation as usual. if you have different wallets, you may need to run bitcoin with "-rescan=1".

I'm not tech savvy. When you say I have to execute "such and such" code I have no idea how to do this. Is this something I type into a certain file somewhere or in command line? Where exactly is this coding done?
Thanks.
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
June 19, 2013, 02:23:41 AM
 #9

I'm not tech savvy. When you say I have to execute "such and such" code I have no idea how to do this. Is this something I type into a certain file somewhere or in command line? Where exactly is this coding done?
Thanks.
You said you were using linux, so I assumed you were knowledgeable enough.

Anything in code boxes are to be executed in a terminal (type it in, hit enter). The commands are assuming you're in the directory where bitcoind is installed.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
xcsler (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100



View Profile
June 19, 2013, 02:55:57 AM
 #10

Thanks. That's helpful. Linux is pretty user friendly these days so I figured I'd switch from Windoze to help avoid viruses.
xcsler (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100



View Profile
June 20, 2013, 01:06:37 AM
 #11

What am I doing wrong? Any ideas?
Thanks.

Code:
~/Downloads/bitcoin-0.8.2-linux/bin/32 $ ./bitcoin-qt -detachdb=1 -datadir=</media/KINGSTON>
bash: syntax error near unexpected token `newline'


grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
June 20, 2013, 01:33:07 AM
 #12

What am I doing wrong? Any ideas?
Thanks.

Code:
~/Downloads/bitcoin-0.8.2-linux/bin/32 $ ./bitcoin-qt -detachdb=1 -datadir=</media/KINGSTON>
bash: syntax error near unexpected token `newline'
Don't bother with datadir. Use the steps from post #9. Then move the files from the existing data directory. Bitcoin's default datadir is in ~/.bitcoin/ (i think, not sure how the unix file system works).

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
xcsler (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100



View Profile
June 20, 2013, 02:16:53 AM
 #13

What am I doing wrong? Any ideas?
Thanks.

Code:
~/Downloads/bitcoin-0.8.2-linux/bin/32 $ ./bitcoin-qt -detachdb=1 -datadir=</media/KINGSTON>
bash: syntax error near unexpected token `newline'
Don't bother with datadir. Use the steps from post #9. Then move the files from the existing data directory. Bitcoin's default datadir is in ~/.bitcoin/ (i think, not sure how the unix file system works).


OK. I left out -datadir and just did the following:
Code:
~/Downloads/bitcoin-0.8.2-linux/bin/32 $ ./bitcoin-qt -detachdb=1

When I do this Bitcoin-qt opens and starts reloading the entire blockchain from the beginning.
Maybe I'm not explaining what I want to do correctly.
I want to run Bitcoin-qt from my laptop computer and have the blockchain stored on an attached USB pendrive as I'm running out of storage space on my laptop's Linux partition.

By the way I appreciate your help. Thanks.
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
June 20, 2013, 03:10:49 AM
 #14

I want to run Bitcoin-qt from my laptop computer and have the blockchain stored on an attached USB pendrive as I'm running out of storage space on my laptop's Linux partition.

By the way I appreciate your help. Thanks.

Oh, in that case, just start bitcoin-qt:
Code:
./bitcoin-qt -datadir=path/to/usb
If you already have a copy of the blockchain downloaded, you can move it to usb (no detach needed). If you plan on using the same files on another computer, you'll need to run with the -detachdb option.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
xcsler (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100



View Profile
June 20, 2013, 03:26:55 AM
 #15

Thank you so much. It's working!
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!