Bitcoin Forum
December 14, 2017, 12:54:57 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Copied blockchain from Windows to Linux, redownloading everything again?  (Read 1242 times)
Richy_T
Legendary
*
Offline Offline

Activity: 1330


1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k


View Profile
July 09, 2015, 03:28:59 AM
 #1

I have a bitchain-qt (0.10.1) which I have been running on Windows with an (fairly) up-to-date blockchain. I have some dev work I'd like to do on Linux (and for which a new wallet would be a good idea anyway) so I downloaded the latest (0.10.2), ran it to create the directories then copied rev*.dat and blk*.dat to a new directory and symlinked the blocks directory in ~/.bitcoin to that thinking that bitcoind would recognize the files and I could avoid having to redownload everything.

The problem is, it's still redownloading everything. It's even overwriting the files so I know it's not that I have some weird directory thing going on. Did I miss a step?

This is what an ls -lrt looks like when I run it on the directory. It's started redownloading right from the beginning...

Code:
[...]
-rwxr--r-- 1 user1 users   67108864 Jul  3 12:46 blk00244.dat*
-rwxr--r-- 1 user1 users    7340032 Jul  3 12:46 rev00244.dat*
-rwxr--r-- 1 user1 users  134214302 Jul  8 16:41 blk00000.dat*
-rwxr--r-- 1 user1 users   19922944 Jul  8 16:41 rev00000.dat*
drwx------ 2 user1 users       4096 Jul  8 22:16 index/
-rwxr--r-- 1 user1 users  134174148 Jul  8 22:16 blk00001.dat*
-rwxr--r-- 1 user1 users   16777216 Jul  8 22:16 rev00001.dat*
-rwxr--r-- 1 user1 users  265289728 Jul  8 22:18 rev00002.dat*
-rwxr--r-- 1 user1 users 2097439789 Jul  8 22:18 blk00002.dat*


If I'm just missing a something, could someone point me at a tutorial?

Note that I'm not worried about having to reindex, just don't see the point of burning bandwidth when I already have the data.

1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
1513212897
Hero Member
*
Offline Offline

Posts: 1513212897

View Profile Personal Message (Offline)

Ignore
1513212897
Reply with quote  #2

1513212897
Report to moderator
1513212897
Hero Member
*
Offline Offline

Posts: 1513212897

View Profile Personal Message (Offline)

Ignore
1513212897
Reply with quote  #2

1513212897
Report to moderator
1513212897
Hero Member
*
Offline Offline

Posts: 1513212897

View Profile Personal Message (Offline)

Ignore
1513212897
Reply with quote  #2

1513212897
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513212897
Hero Member
*
Offline Offline

Posts: 1513212897

View Profile Personal Message (Offline)

Ignore
1513212897
Reply with quote  #2

1513212897
Report to moderator
1513212897
Hero Member
*
Offline Offline

Posts: 1513212897

View Profile Personal Message (Offline)

Ignore
1513212897
Reply with quote  #2

1513212897
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
July 09, 2015, 03:34:40 AM
 #2

It isn't redownloading, it is reindexing the blockchain. It doesn't take as long to reindex everything. I have run into this problem before. For some reason, Bitcoin Core doesn't recognize the databases from windows and vice versa. Just let it reindex the block chain, it will take considerably less time than a redownload since you already have the raw block files, it just needs to rebuild the databases it uses.

Richy_T
Legendary
*
Offline Offline

Activity: 1330


1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k


View Profile
July 09, 2015, 03:42:53 AM
 #3

I'm not so sure since those timestamps show the files being modified. Bandwidth was taking a hit too but it's possible that that was just because I quit my client a few days ago.

It's looking like I probably need to copy the whole of the blocks directory and the chainstate directory too. I'll give that a go and see how it works out.

Worst case, I should probably be able to just tell the bitcoind on linux to use my windows node as a peer and get the blocks that way.

1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
July 09, 2015, 03:49:06 AM
 #4

I'm not so sure since those timestamps show the files being modified. Bandwidth was taking a hit too but it's possible that that was just because I quit my client a few days ago.

It's looking like I probably need to copy the whole of the blocks directory and the chainstate directory too. I'll give that a go and see how it works out.

Worst case, I should probably be able to just tell the bitcoind on linux to use my windows node as a peer and get the blocks that way.
The timestamps modify because it is reading from each file and the act of opening and reading a file will modify its timestamp. It needs to read the blk files in order to build the other leveldb files.

Richy_T
Legendary
*
Offline Offline

Activity: 1330


1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k


View Profile
July 09, 2015, 03:55:07 AM
 #5

Hmm, for some reason on my windows client, it looks like my peers have decided to starve me of data.


1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
Richy_T
Legendary
*
Offline Offline

Activity: 1330


1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k


View Profile
July 09, 2015, 03:57:22 AM
 #6

Opening a file simply for reading should update its access time but not its modify time in linux.

Code:
~/.bitcoin$ stat blocks/blk00001.dat
  File: 'blocks/blk00001.dat'
  Size: 134174148       Blocks: 262328     IO Block: 4096   regular file
Device: fd05h/64773d    Inode: 10493965    Links: 1
Access: (0744/-rwxr--r--)  Uid: ( 1000/    rich)   Gid: (  100/   users)
Access: 2015-07-08 22:16:36.913205675 -0500
Modify: 2015-07-08 22:16:33.403205785 -0500
Change: 2015-07-08 22:16:33.403205785 -0500
 Birth: -

1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
Richy_T
Legendary
*
Offline Offline

Activity: 1330


1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k


View Profile
July 09, 2015, 04:17:31 AM
 #7

Hmm. Had no inbound ports open for the windows client. Let's see if that helps.

1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
Richy_T
Legendary
*
Offline Offline

Activity: 1330


1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k


View Profile
July 09, 2015, 04:39:52 AM
 #8

Weird. Was like that for a while on "5 days behind" then I restarted, jumped to "3 days behind" but no network traffic at all also no response on debug console. Then restarted and got stuck on "loading wallet" then rebooted whole computer and it stuck on "Rescan... 100%" for 5 minutes and when it finally started, I was only 5 hours behind and now I'm caught up.

Just plain odd. I appear to be caught up and good now.

Will play more with the copying to Linux tomorrow.

I guess maybe I was actually caught up but the bitcoind part was still busy with something so wasn't updating the GUI or something odd.

1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
Richy_T
Legendary
*
Offline Offline

Activity: 1330


1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k


View Profile
August 04, 2015, 07:45:56 PM
 #9

I hate when people post problems so I always like to come back when I figure things out.

Just for information, I can confirm that copying the complete blocks directory and the chainstate, the blockchain was not redownloaded and only the blocks between last shutdown to the latest were downloaded.

1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
unholycactus
Hero Member
*****
Offline Offline

Activity: 980


https://reg-charity.org/


View Profile WWW
August 04, 2015, 09:34:18 PM
 #10

I hate when people post problems so I always like to come back when I figure things out.

Just for information, I can confirm that copying the complete blocks directory and the chainstate, the blockchain was not redownloaded and only the blocks between last shutdown to the latest were downloaded.

It does work, but it feels to me that every time I've done something similar (importing my blockchain along with everything else after a reformat or another computer), something goes wrong and my wallet client is corrupted/slow/buggy.
Having unlimited bandwidth and a lot of spare time, I usually prefer doing a clean install.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!