Bitcoin Forum
April 26, 2024, 03:45:45 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: 1 2 [All]
  Print  
Author Topic: bitcoin-qt: Move Downloaded blockchain to another installation  (Read 14326 times)
doghouse (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
February 11, 2013, 10:36:18 AM
 #1

This is a newbie question...

I've installed bitcoin-qt and Armoury on on a PC. After ages, (more than 8 hours) the blockchain is still downloading. (Last received block generated 175 days ago).
Instead of going through the same rigmarole again on another PC, can I install bitcoin-qt, and move the files from C:\Users\USERNAME\AppData\Roaming\Bitcoin to the new installation?

Which files do I need?
Are blk0001.dat, blk0002.dat and blkindex.dat enough? (I don't need to move my wallet.dat)

Can they just be "dropped into place", or is there a command line option I need to use to make it recognised?

Many Thanks!
Remember that Bitcoin is still beta software. Don't put all of your money into BTC!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Akka
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001



View Profile
February 11, 2013, 10:43:51 AM
 #2

Yes, that are the files you need, just copying the should be sufficient. But as you are not finished yet anyway, I would suggest, that you upgrade to v0.8 instead.

This Version uses ultraprune and reduces the download time for the blockchain to a few hours.

The final version is not out yet, but you can download the release candidate here: https://bitcointalk.org/index.php?topic=142151.0

All previous versions of currency will no longer be supported as of this update
doghouse (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
February 11, 2013, 11:36:29 AM
 #3

Hi Akka,
Thanks for your help!
I'm using v0.7.2-beta... when did v0.8 come out?

Can I still transpant the files over to 0.8?

Kind Regards.
Akka
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001



View Profile
February 11, 2013, 11:43:40 AM
Last edit: February 11, 2013, 09:43:16 PM by Akka
 #4

I'm using v0.7.2-beta... when did v0.8 come out?

3 days ago, so it's brand new.

Can I still transpant the files over to 0.8?

Kind Regards.

Yes and no, 0.8 needs to convert the files to the new format. If you are not finished downloading anyway, I would let it start new.

All previous versions of currency will no longer be supported as of this update
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
February 11, 2013, 09:42:01 PM
 #5

v0.8.0 is not released yet, there's only a release candidate.

I do Bitcoin stuff.
zvs
Legendary
*
Offline Offline

Activity: 1680
Merit: 1000


https://web.archive.org/web/*/nogleg.com


View Profile WWW
February 13, 2013, 09:17:03 AM
 #6

Hi Akka,
Thanks for your help!
I'm using v0.7.2-beta... when did v0.8 come out?

Can I still transpant the files over to 0.8?

Kind Regards.

i have a 7z of 0.8 reorganization @ http://www.nogleg.com/archive/v0.8.0-Feb-11th/v0.8.0-Feb-11th.7z   goes up to block 220800 or so..  it isn't "pruned", so it's just as big as before, but in a diff format

and then you'd delete everything but bitcoin.conf & wallet.dat, then use that for 0.8 rc

aha
BookLover
Hero Member
*****
Offline Offline

Activity: 533
Merit: 500


^Bitcoin Library of Congress.


View Profile
February 13, 2013, 03:26:44 PM
 #7

This is a newbie question...

I've installed bitcoin-qt and Armoury on on a PC. After ages, (more than 8 hours) the blockchain is still downloading. (Last received block generated 175 days ago).
Instead of going through the same rigmarole again on another PC, can I install bitcoin-qt, and move the files from C:\Users\USERNAME\AppData\Roaming\Bitcoin to the new installation?

Which files do I need?
Are blk0001.dat, blk0002.dat and blkindex.dat enough? (I don't need to move my wallet.dat)

Can they just be "dropped into place", or is there a command line option I need to use to make it recognised?

Many Thanks!
Yes, blk0001.dat, blk0002.dat and blkindex.dat are enough. (Unless there is a new blk0003.dat then you need it to.)
Before moving any files start both the bitcoin-qt clients, go to options, and check the box which says detach database at shutdown.  Then close both clients. (Make sure they are closed in taskmanager.) then you are free to move the block chain files.

P.S. You can start the bitcoin clients with the command option -detachdb to accomplish the same thing as checking the box.
P.S. After the files are successfully imported you may want to deselect the detach database at shutdown to speed up the shut down of the bitcoin-qt clients.

zvs
Legendary
*
Offline Offline

Activity: 1680
Merit: 1000


https://web.archive.org/web/*/nogleg.com


View Profile WWW
February 13, 2013, 04:47:22 PM
 #8

This is a newbie question...

I've installed bitcoin-qt and Armoury on on a PC. After ages, (more than 8 hours) the blockchain is still downloading. (Last received block generated 175 days ago).
Instead of going through the same rigmarole again on another PC, can I install bitcoin-qt, and move the files from C:\Users\USERNAME\AppData\Roaming\Bitcoin to the new installation?

Which files do I need?
Are blk0001.dat, blk0002.dat and blkindex.dat enough? (I don't need to move my wallet.dat)

Can they just be "dropped into place", or is there a command line option I need to use to make it recognised?

Many Thanks!
Yes, blk0001.dat, blk0002.dat and blkindex.dat are enough. (Unless there is a new blk0003.dat then you need it to.)
Before moving any files start both the bitcoin-qt clients, go to options, and check the box which says detach database at shutdown.  Then close both clients. (Make sure they are closed in taskmanager.) then you are free to move the block chain files.

P.S. You can start the bitcoin clients with the command option -detachdb to accomplish the same thing as checking the box.
P.S. After the files are successfully imported you may want to deselect the detach database at shutdown to speed up the shut down of the bitcoin-qt clients.

for?  reindexing?  unless you have 8GB RAM for a ramdrive or less than 10Mbps downstream, it'd be quicker to DL
doghouse (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
February 13, 2013, 08:59:09 PM
 #9

Thanks everyone for your help!
In the end, I installed v0.8 and then re-downloaded the Blockchain from scratch using the -dbcache=2000 parameter. This was much quicker than on the previous version of bitcoin-qt. Unfortunately, it and Armory takes up a lot of RAM though!
BookLover
Hero Member
*****
Offline Offline

Activity: 533
Merit: 500


^Bitcoin Library of Congress.


View Profile
February 14, 2013, 02:47:20 PM
 #10

This is a newbie question...

I've installed bitcoin-qt and Armoury on on a PC. After ages, (more than 8 hours) the blockchain is still downloading. (Last received block generated 175 days ago).
Instead of going through the same rigmarole again on another PC, can I install bitcoin-qt, and move the files from C:\Users\USERNAME\AppData\Roaming\Bitcoin to the new installation?

Which files do I need?
Are blk0001.dat, blk0002.dat and blkindex.dat enough? (I don't need to move my wallet.dat)

Can they just be "dropped into place", or is there a command line option I need to use to make it recognised?

Many Thanks!
Yes, blk0001.dat, blk0002.dat and blkindex.dat are enough. (Unless there is a new blk0003.dat then you need it to.)
Before moving any files start both the bitcoin-qt clients, go to options, and check the box which says detach database at shutdown.  Then close both clients. (Make sure they are closed in taskmanager.) then you are free to move the block chain files.

P.S. You can start the bitcoin clients with the command option -detachdb to accomplish the same thing as checking the box.
P.S. After the files are successfully imported you may want to deselect the detach database at shutdown to speed up the shut down of the bitcoin-qt clients.

for?  reindexing?  unless you have 8GB RAM for a ramdrive or less than 10Mbps downstream, it'd be quicker to DL
No, when you check detach database at shutdown it allows the bitcoin-qt client to accept the new blockchain without errors.  It does NOT have to index the blockchain, it simply loads the blockchain files on startup like it would its own.  This is infinity faster than updating the blockchain from DL.

P.S. I may not have been clear in may previous post.  When you move the blockchain files, you move them to the bitcoin directory and REPLACE the other blockchain files.  You do NOT run the client so that is updates its blockchain files from the new ones.

Mousepotato
Hero Member
*****
Offline Offline

Activity: 896
Merit: 1000


Seal Cub Clubbing Club


View Profile
February 16, 2013, 03:05:32 PM
 #11

I moved my bitcoin-qt.exe to my external drive E:\ and just dumped the blockchain files into that same directory on E:\ as well.  However, whenever I run bitcoin-qt.exe -detachdb, it keeps re-creating C:\Mousepotato\Appdata\Roaming\Bitcoin and starts downloading the blockchain again.  What am I doing wrong?

Mousepotato
BookLover
Hero Member
*****
Offline Offline

Activity: 533
Merit: 500


^Bitcoin Library of Congress.


View Profile
February 16, 2013, 03:26:13 PM
 #12

You need to run bitcoin with the command "-datadir E:\" change the path to wherever you want your bitcoin directory to be.

Mousepotato
Hero Member
*****
Offline Offline

Activity: 896
Merit: 1000


Seal Cub Clubbing Club


View Profile
February 16, 2013, 03:28:20 PM
 #13

You need to run bitcoin with the command "-datadir E:\" change the path to wherever you want your bitcoin directory to be.

Thank you!

Mousepotato
niko
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


There is more to Bitcoin than bitcoins.


View Profile
February 16, 2013, 03:33:17 PM
 #14

I moved my bitcoin-qt.exe to my external drive E:\ and just dumped the blockchain files into that same directory on E:\ as well.  However, whenever I run bitcoin-qt.exe -detachdb, it keeps re-creating C:\Mousepotato\Appdata\Roaming\Bitcoin and starts downloading the blockchain again.  What am I doing wrong?
You should have detached the databases before moving the files. Once you have them moved, the option is no longer needed.

They're there, in their room.
Your mining rig is on fire, yet you're very calm.
tinyapps
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile WWW
March 24, 2013, 07:59:49 AM
 #15

Quote
Which files do I need? Are blk0001.dat, blk0002.dat and blkindex.dat enough?
It seems that in 0.8.1 those have been superceded by two new directories: blocks and chainstate. There is a third directory named "database", but I dimly recall that being present in previous versions as well.

As of 3/23/13, those three directories contain about 7.76GB of data, with blocks making up 7.57GB of that total.

Is copying the blockchain to a new machine as simple as pasting one or more of these directories? Is there any reason to keep blk0001.dat, blk0002.dat and blkindex.dat?
batcoin
Full Member
***
Offline Offline

Activity: 238
Merit: 100


In Gord We Trust


View Profile
March 24, 2013, 09:57:05 AM
 #16

Quote
Which files do I need? Are blk0001.dat, blk0002.dat and blkindex.dat enough?
It seems that in 0.8.1 those have been superceded by two new directories: blocks and chainstate. There is a third directory named "database", but I dimly recall that being present in previous versions as well.

As of 3/23/13, those three directories contain about 7.76GB of data, with blocks making up 7.57GB of that total.

Is copying the blockchain to a new machine as simple as pasting one or more of these directories? Is there any reason to keep blk0001.dat, blk0002.dat and blkindex.dat?

I would also be interested in the steps needed for moving the blockchain around in 0.8.1. Any helpers out there?

If you have more than 0.01BTC and complain about early adopters, please consider donating to this address: 1P11Dz4mhDcJvetHqEJu35KNEVqSRmqo3b
General Tips: 1P4YfrYwQKKtfwszzb2aHgLVLiWQCrJfwi
Fressac
Newbie
*
Offline Offline

Activity: 18
Merit: 0



View Profile
March 26, 2013, 05:26:18 PM
 #17

On my side (WinXP), data directory is on D: drive, folder BitcoinData, so "Target" field for shortcut is:

"C:\Program Files\Bitcoin\bitcoin-qt.exe" -datadir=D:\BitcoinData
Does anyone have any idea how to change the default data directory on a Mac? I'm not aware of a "Target" parameter when launching apps in OS X. I've tried googling it but come up with nothing.
tinyapps
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile WWW
March 26, 2013, 05:33:52 PM
 #18

Quote
Does anyone have any idea how to change the default data directory on a Mac?

Just put the files in the default location:

~/Library/Application Support/Bitcoin

The tilde (~) represents the root directory of your home folder. The full path would look something like:

/Users/username/Library/Application Support/Bitcoin

If you wanted to change the default location, one way would be to use a symlink. I had to do this for the iMovie data directory years ago:

http://tinyapps.org/blog/mac/200805230700_change_imovie_save_directory.html
Fressac
Newbie
*
Offline Offline

Activity: 18
Merit: 0



View Profile
March 26, 2013, 08:23:48 PM
 #19

If you wanted to change the default location, one way would be to use a symlink. I had to do this for the iMovie data directory years ago:

http://tinyapps.org/blog/mac/200805230700_change_imovie_save_directory.html
Of course! Thanks.
tinyapps
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile WWW
March 28, 2013, 05:56:06 PM
 #20

Unable to find a definitive answer to the question of copying the blockchain to another computer, I asked Gavin via email:

In Bitcoin-Qt 0.8+, how can the blockchain be copied from one computer to another? Is it simply a matter of copying the blocks and chainstate directories?

His reply:

Yes
Fressac
Newbie
*
Offline Offline

Activity: 18
Merit: 0



View Profile
March 29, 2013, 09:50:28 AM
 #21

Unable to find a definitive answer to the question of copying the blockchain to another computer, I asked Gavin via email:

In Bitcoin-Qt 0.8+, how can the blockchain be copied from one computer to another? Is it simply a matter of copying the blocks and chainstate directories?

His reply:

Yes
That's right. I posted on this here:
https://bitcointalk.org/index.php?topic=157314.msg1680307#msg1680307

Basically just make a copy of the whole Bitcoin data directory and drop it into any computer with the Bitcoin-Qt client installed on it. Make sure the client is not running and replace the existing directory with the copy.
BE CAREFUL NOT TO ERASE ANY WALLET THAT MAY HAVE VALUE!
tinyapps
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile WWW
March 29, 2013, 05:54:10 PM
 #22

Quote
Basically just make a copy of the whole Bitcoin data directory and drop it into any computer
For 0.8+, you may want to skip at least the deprecated blkxxxx.dat and blkindex.dat files since they are no longer used and are quite large. More on the data directory contents: https://en.bitcoin.it/wiki/Data_directory
matt.collier
Member
**
Offline Offline

Activity: 105
Merit: 10



View Profile
March 30, 2013, 12:54:30 AM
 #23

Hello All,

I can confirm that it is possible to copy the block chain from a Windows v0.8.1-beta installation to a linux v0.8.1-beta by copying only the contents (including subdirectories) of 'blocks' and 'chainstate' folders.

Matt
tinyapps
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile WWW
March 30, 2013, 03:59:31 AM
 #24

Thanks very much for confirming that, Matt!
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
March 30, 2013, 08:50:32 AM
 #25

Unable to find a definitive answer to the question of copying the blockchain to another computer, I asked Gavin via email:

In Bitcoin-Qt 0.8+, how can the blockchain be copied from one computer to another? Is it simply a matter of copying the blocks and chainstate directories?

His reply:

Yes

That is appropriately curt. You feel entitled to bother a lead developer for your own personal tech support? I have a feeling this is one reason why Satoshi was no longer entertained with the forum.
tinyapps
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile WWW
March 30, 2013, 06:30:38 PM
Last edit: March 31, 2013, 12:33:58 AM by tinyapps
 #26

Quote
You feel entitled to bother a lead developer
I feel "entitled" to email anyone who shares his or her email address with the world. S/he is of course free to ignore my email. We are all equals, my friend.

Quote
for your own personal tech support?
It was actually to post here so that the entire community could have a definitive answer to this question. Ironically, it was a post of yours that finally convinced me that I had to check with someone who would actually know the correct answer: https://bitcointalk.org/index.php?topic=145437.msg1553996#msg1553996

Quote
It has also been reported that the new leveldb database format is not as portable, i.e. a datadir created on Linux might not work on Windows.
I had even replied to that comment 5 days ago asking for any further details from you or the community: https://bitcointalk.org/index.php?topic=145437.msg1670599#msg1670599

Quote
Thanks for the info, deepceleron. Do you know if it is possible to copy the 0.8 blockchain to a new computer by simply pasting the blocks and chainstate directories? Any further info on whether such a transfer would work cross-platform or not?
Sadly, apparently no one here knew the correct answer or could be bothered to share it. I decided to try my best to find out and share the answer so that others could benefit. With the blockchain well over 7.5GB and growing fast, it is important that users know how to copy the blockchain correctly.
keystroke
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1014


advocate of a cryptographic attack on the globe


View Profile
April 08, 2013, 04:07:59 AM
 #27

Thanks, this was helpful information.

"The difference between a castle and a prison is only a question of who holds the keys."
Pages: 1 2 [All]
  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!