Bitcoin Forum

Other => Beginners & Help => Topic started by: forbun on June 19, 2011, 11:59:43 AM



Title: How to Copy Block Chain? (Mac OS X)
Post by: forbun on June 19, 2011, 11:59:43 AM
I have a copy of the block chain on my computer. My friend, who wants to start using Bitcoin, doesn't have the block chain yet. How do I copy the block chain from my computer to his, so that he doesn't have to re-download the whole thing?


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: willphase on June 19, 2011, 12:02:46 PM
I have a copy of the block chain on my computer. My friend, who wants to start using Bitcoin, doesn't have the block chain yet. How do I copy the block chain from my computer to his, so that he doesn't have to re-download the whole thing?

EITHER: give your IP address to your friend and he starts his bitcoin with the -connect=YOURIP and it will download from your client.  Probably only a better option if you are link local to your friend.

OR: copy the bitcoin block datafile from his machine to yours.  (it's in %appdata%\bitcoin)

OR: in the time you spend writing a post on the forum, reading the replies, and doing what they say, he could probably just download the blockchain himself.

Will


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: forbun on June 19, 2011, 12:37:38 PM
Re-downloading the entire block chain takes an eternity, at least here in Vietnam (where we are currently located).

I copied the block chain files from the data directory, but this does not work.

Bitcoin gives an error on launch:

Code:
EXCEPTION: 11DbException       
Db::open: Invalid argument       
bitcoin in AppInit()     

When I click OK, I get this:

Code:
EXCEPTION: 11DbException       
Db::open: Invalid argument       
bitcoin in CMyApp::OnUnhandledException()     

Bitcoin then crashes.


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: forbun on June 19, 2011, 12:38:57 PM
BTW, the files I copied are:

blkindex.dat

blk0001.dat

Is this sufficient?


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: willphase on June 19, 2011, 01:04:58 PM
BTW, the files I copied are:

blkindex.dat

blk0001.dat

Is this sufficient?

you need blk*.dat.  You might also want to delete the log/* directory if the client had previously already started downloading blocks.

Also, if your friend has a wallet already, you will want to start bitcoin with the -rescan option to import transactions from the block chain into his wallet balance.

Will


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: forbun on June 19, 2011, 01:24:14 PM
There are no other blk*.dat files. Is this ok?

On Mac, there is no log/ directory, but there is database/, as well as 2 .log files:

db.log
debug.log

I tried deleting (moving) these files as well, but Bitcoin still crashes.


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: willphase on June 19, 2011, 01:31:07 PM
There are no other blk*.dat files. Is this ok?

On Mac, there is no log/ directory, but there is database/, as well as 2 .log files:

db.log
debug.log

I tried deleting (moving) these files as well, but Bitcoin still crashes.

are you close to each other?  If so - the second option might be best, especially if you're on the same network.

Find out your IP by going to www.whatismyip.com and make sure inbound port 8333 is set up, then just give this to your friend and get them to start bitcoin with the -connect=YOURIP.  Then at least the traffic will just download within Vietnam.

Otherwise, make sure your friend deletes all the files (except wallet.dat, if he has bitcoins already) then copies your blk*.dat files into the bitcoin configuration directory.

Will


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: Rob P. on June 19, 2011, 03:47:36 PM
FWIW:  If you don't download the blockchain through your client, your client will not verify it.  You're better off to use the -connect method offered by the other poster.


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: forbun on June 25, 2011, 04:55:51 PM
If I use -rescan, will the Bitcoin client verify it?


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: willphase on June 25, 2011, 09:53:32 PM
If I use -rescan, will the Bitcoin client verify it?

no -rescan doesn't verify the hashes link together or that the block is valid (e.g. right difficulty, valid generation transactions etc etc) on the block chain, it just looks through each block for transactions that match the keys in your wallet.

Will


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: Maged on June 26, 2011, 05:32:08 AM
Be sure to quit out of your bitcoin client before making the copy on your end. Same thing on the receiving machine.


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: sahana on March 07, 2014, 04:08:40 AM
Quote
Find out your IP by going to www.whatismyip.com

There is a similar ip search site called IP-Details.com (http://www.ip-details.com/) to check our External ip address. Here it display IP address, ISP, Location, Country and so on,...


Title: Re: How to Copy Block Chain? (Mac OS X)
Post by: shorena on March 07, 2014, 01:57:29 PM
Quote
Find out your IP by going to www.whatismyip.com

There is a similar ip search site called IP-Details.com (http://www.ip-details.com/) to check our External ip address. Here it display IP address, ISP, Location, Country and so on,...


985 days necro to promote some strange site noone needs?
All your posts look the same. Are you even human?