Move the blockchain to a different location

4

I am using the Bitcoin-Qt application on Ubuntu, but the blockchain is very large and is wasting space on my SSD drive. Is there a way that I can move it to a hard disk drive?

There doesn't seem to be a setting for this. Is it possible?

Qwertie

Posted 2013-12-28T02:35:46.803

Reputation: 165

1

possible duplicate of Bitcoin-qt setup: Change block-chain file location, settings? documentation?

Murch 2013-12-28T11:15:46.073

@Murch The answer there wont work with UbuntuQwertie 2013-12-28T23:33:38.317

Asking about how to change the default storage location has been posted many, many times. The future canonical question is probably Bitcoin-Qt setup: Change block-chain file location, settings? documentation?. Possible duplicate of Bitcoin-Qt setup: Change block-chain file location, settings? documentation?.

Peter Mortensen 2014-08-01T12:19:31.050

Answers

4

First close your client down and then copy the .bitcoin folder that was created in your home directory to the new location where you wish to store the data. Second create a symbolic link using the new path:

ln -s /new/path/to/.bitcoin .bitcoin

Finally restart the bitcoin client and it will use the blockchain stored at /new/path/to/.bitcoin (or wherever you put it)

Mark S.

Posted 2013-12-28T02:35:46.803

Reputation: 2 415

That dident work bitcoin qt just made a new .bitcoin folder in the home directoryQwertie 2013-12-29T05:39:07.727

you need to make sure you execute the command in the home directory and if you run ls -alF you should see the file as a link with an arrow pointing to the new location.... also be sure you use mv -r .bitcoin /new/path/to/.bitcoin to ensure all the files get moved appropriatelyMark S. 2013-12-29T05:41:27.603

or once you move the .bitcoin folder launch bitcoin-qt with -datadir=/new/path/to/.bitcoinMark S. 2013-12-29T05:42:54.080

I did this with the file explore GUI and it works fine nowQwertie 2013-12-29T05:45:06.473

Finally !! Thanks a lot for the symbolic link tip, I couldn't understand why the -datadir command doesnt appear in the debug window of the software, I could eventually manage to store the blockchain on a specific partition with your help :) – None – 2014-02-22T15:03:02.053