Pages:
Author

Topic: I do not want blockchain data stored under Application Data folder, how to (Read 41768 times)

copper member
Activity: 97
Merit: 10
Leave everything to me!
On Windows Vista or later, the whole %appdata%\Bitcoin directory can be replaced with a symbolic directory link:
(0) Make sure the bitcoin client is not running.
(1) Move the %appdata%\Bitcoin directory to its target location (e.g. d:\bitcoinData)
(2) Run the command prompt as root and issue the command mklink /d "c:\users\\appdata\roaming\bitcoin" "d:\bitcoinData"
done!

This allows you to keep bitcoin client data anywhere, e.g. on a secure local fileserver.
Great, thank you! I'm surprised there isn't a setting to specify a destination location for blockchain data, etc. With the size exceeding 25GB already, it's probably well overdue.

Yeah,

This seems to be fixed in bitcoin core 0.9.3

I was asked twice: First when 'opening' bitcoin,

and again when starting for the first time with a warning to the 25GB blockchain size



sr. member
Activity: 280
Merit: 250
On Windows Vista or later, the whole %appdata%\Bitcoin directory can be replaced with a symbolic directory link:
(0) Make sure the bitcoin client is not running.
(1) Move the %appdata%\Bitcoin directory to its target location (e.g. d:\bitcoinData)
(2) Run the command prompt as root and issue the command mklink /d "c:\users\\appdata\roaming\bitcoin" "d:\bitcoinData"
done!

This allows you to keep bitcoin client data anywhere, e.g. on a secure local fileserver.
Great, thank you! I'm surprised there isn't a setting to specify a destination location for blockchain data, etc. With the size exceeding 25GB already, it's probably well overdue.
newbie
Activity: 21
Merit: 0
I know this is an old thread but I had to use it a couple times and wanted to share some useful info.


If you want to create a symlink to a new bitcoin data directory in Windows you have to make sure that the original directory is either deleted or renamed. I suggest the following:


Shutdown bitcoin client
rename C:\Users\username\AppData\Roaming\Bitcoin to something else, like bitcoin_old
Then create the new directory where you want your data to be stored, example E:\bitcoinData
then you can run the mklink command. mklink /d "c:\Users\username\AppData\Roaming\Bitcoin" e:\BitcoinData


I had trouble with this and the command fails if the original bitcoin directory is still there. So you have to rename it.

Also, if you want to do the same for a NAS share, you have to specify the full path to the share, and not the drive letter:

mklink /d "c:\Users\username\AppData\Roaming\Bitcoin" \\nas-server-name\BitcoinData

hero member
Activity: 1666
Merit: 565
My solution is to create a bat file in the same directory as the exe for litecoin/bitcoin/dogecoin/etc
You need to disable the "run at startup" option in the client itself, as this would create a shortcut at the startup dir for running the client with the default data directory. Trying to change that shortcut will be futile as it will reset to the defaul form (IIRC whenever you look at options menu)

bat file code:
Code:
IF NOT EXIST .\DATA mkdir DATA
start bitcoin-qt.exe -min -datadir=.\DATA
exit

As you can see, it uses a relative subdirectory called DATA and located inside the client's folder.
It creates that directory if it doesn't exist because otherwise the client will error out saying the directory is missing and self terminate (instead of creating the directory)

Then you just need to put a shortcut to that bat file in the startup directory and set that shortcut to run minimized to avoid an unsightly command prompt coming up every time.
The reason I use "start" and "exit" is to ensure that the cmd prompt itself is gone after the program starts.

oh, and make sure to change bitcoin-qt.exe to litecoin / dogecoin / whatevercoin as needed

Hi!
i need to run the wallet as administrator. How can i change the bat file to do that?

Thanks!
hll
newbie
Activity: 2
Merit: 0
I Would like to part the wallet from the blockchain (database, index and everything ).
Store the wallet on a HDD, and store the blockchain on the, occasionally volatile SSD or external Flash drive.


I'v tried using symbolic links for the blk*, blocks folder, and chainstate folder. when loading QT, it crashes
...Also, it is only supported for destination-NTFS paratition. not all usb flash (such as mine) support these.

I Consider opening a feature request on the GIT. it seems like a VERY needed feature to part the wallet and the BC, for the storage requirements of each very different...

Again, moving the whole data dir is NOT an option, for the fact that HDD are much more prone to erros than flash or SSD.


(Search keywords, what I tried too lookup on google:
offloading the blockchain onto an ssd or flash drive )
newbie
Activity: 35
Merit: 0
On Windows Vista or later, the whole %appdata%\Bitcoin directory can be replaced with a symbolic directory link:
(0) Make sure the bitcoin client is not running.
(1) Move the %appdata%\Bitcoin directory to its target location (e.g. d:\bitcoinData)
(2) Run the command prompt as root and issue the command mklink /d "c:\users\\appdata\roaming\bitcoin" "d:\bitcoinData"
done!

This allows you to keep bitcoin client data anywhere, e.g. on a secure local fileserver.
Guys, Really this is the better one, I literally forgot that i was using it, ive been using it all the bitcoin clients across my house's computers it works great and im even using Shortcuts instead!

Not to be the a threadomancer but this set of instructions really helped me out. Bitcoin was getting too large for my SSD and this is the perfect solution. Just make sure you backup you wallet before doing so.

Also in order to make a symbolic link we need to remove the existing bitcoin directory in the appdata folder by either cutting and pasting it or moving it all together.
legendary
Activity: 1190
Merit: 1000
no need to carry heavy money bags anymore
My solution is to create a bat file in the same directory as the exe for litecoin/bitcoin/dogecoin/etc
You need to disable the "run at startup" option in the client itself, as this would create a shortcut at the startup dir for running the client with the default data directory. Trying to change that shortcut will be futile as it will reset to the defaul form (IIRC whenever you look at options menu)

bat file code:
Code:
IF NOT EXIST .\DATA mkdir DATA
start bitcoin-qt.exe -min -datadir=.\DATA
exit

As you can see, it uses a relative subdirectory called DATA and located inside the client's folder.
It creates that directory if it doesn't exist because otherwise the client will error out saying the directory is missing and self terminate (instead of creating the directory)

Then you just need to put a shortcut to that bat file in the startup directory and set that shortcut to run minimized to avoid an unsightly command prompt coming up every time.
The reason I use "start" and "exit" is to ensure that the cmd prompt itself is gone after the program starts.

oh, and make sure to change bitcoin-qt.exe to litecoin / dogecoin / whatevercoin as needed

This is exactly what i've been looking for. 

many thanks
full member
Activity: 196
Merit: 100
My solution is to create a bat file in the same directory as the exe for litecoin/bitcoin/dogecoin/etc
You need to disable the "run at startup" option in the client itself, as this would create a shortcut at the startup dir for running the client with the default data directory. Trying to change that shortcut will be futile as it will reset to the defaul form (IIRC whenever you look at options menu)

bat file code:
Code:
IF NOT EXIST .\DATA mkdir DATA
start bitcoin-qt.exe -min -datadir=.\DATA
exit

As you can see, it uses a relative subdirectory called DATA and located inside the client's folder.
It creates that directory if it doesn't exist because otherwise the client will error out saying the directory is missing and self terminate (instead of creating the directory)

Then you just need to put a shortcut to that bat file in the startup directory and set that shortcut to run minimized to avoid an unsightly command prompt coming up every time.
The reason I use "start" and "exit" is to ensure that the cmd prompt itself is gone after the program starts.

oh, and make sure to change bitcoin-qt.exe to litecoin / dogecoin / whatevercoin as needed
newbie
Activity: 10
Merit: 0
thank you for all the replies !!! i just transfered my bitcoin,litecoin,dogecoin appdata folders to my external hard drive disk !!
thank you ! Grin
full member
Activity: 164
Merit: 100
A more user-friendly way of essentially the same thing is using this tool:
http://bitsum.com/junctionmaster.php
legendary
Activity: 1428
Merit: 1001
Okey Dokey Lokey
On Windows Vista or later, the whole %appdata%\Bitcoin directory can be replaced with a symbolic directory link:
(0) Make sure the bitcoin client is not running.
(1) Move the %appdata%\Bitcoin directory to its target location (e.g. d:\bitcoinData)
(2) Run the command prompt as root and issue the command mklink /d "c:\users\\appdata\roaming\bitcoin" "d:\bitcoinData"
done!

This allows you to keep bitcoin client data anywhere, e.g. on a secure local fileserver.
Guys, Really this is the better one, I literally forgot that i was using it, ive been using it all the bitcoin clients across my house's computers it works great and im even using Shortcuts instead!
legendary
Activity: 1442
Merit: 1005
This is what I have done on Windows 7 using a symbolic link:

1. Open C:\Users\[username]\AppData\Roaming\Bitcoin\

2. Move the file blk0001.dat (the large file that stores the block chain) to a different disk, eg. D:\bitcoin-blockchain\

3. Run Command Prompt as Administrator (Accessories>Command Promt) and right click "Run as administrator". CAREFUL! mistyping a command here could damage your OS, so make sure you have backed up all important files before doing this.

4. Go to Bitcoin Folder

Code:
cd C:\Users\[username]\AppData\Roaming\Bitcoin\

5. Execute mklink commnand, eg.

Code:
mklink blk0001.dat D:\bitcoin-blockchain\blk0001.dat


This replaces your blk0001.dat file with an identically-named symbolic link file.

Good luck.
This!

Except you can do it better by deleting everything except wallet.dat, linking the whole folder on another drive and redownloading the blockchain.
sr. member
Activity: 700
Merit: 250
Any word on whether the option to specify the blockchain location is getting worked into the main client?

+1
full member
Activity: 126
Merit: 100
This is what I have done on Windows 7 using a symbolic link:

1. Open C:\Users\[username]\AppData\Roaming\Bitcoin\

2. Move the file blk0001.dat (the large file that stores the block chain) to a different disk, eg. D:\bitcoin-blockchain\

3. Run Command Prompt as Administrator (Accessories>Command Promt) and right click "Run as administrator". CAREFUL! mistyping a command here could damage your OS, so make sure you have backed up all important files before doing this.

4. Go to Bitcoin Folder

Code:
cd C:\Users\[username]\AppData\Roaming\Bitcoin\

5. Execute mklink commnand, eg.

Code:
mklink blk0001.dat D:\bitcoin-blockchain\blk0001.dat


This replaces your blk0001.dat file with an identically-named symbolic link file.

Good luck.

For anyone still struggling with this issue:

You can follow the steps above, but instead, copy the entire Bitcoin folder to a separate drive. Then, in place of step 5, do this:

Code:
mklink /d Bitcoin D:\Bitcoin

This will create a directory link, allowing you to store ALL blocks at a separate location.
legendary
Activity: 2198
Merit: 1311
Any word on whether the option to specify the blockchain location is getting worked into the main client?
full member
Activity: 196
Merit: 100
Adding a "Data directory" field in the options I guess.

That way only maybe a "datadir.conf" file would be at the default location pointing to the actual location.
That is a great idea! better then mine
legendary
Activity: 1232
Merit: 1094
Adding a "Data directory" field in the options I guess.

That way only maybe a "datadir.conf" file would be at the default location pointing to the actual location.

Exactly, or just add it to the current config file.

New versions of the software and all shortcuts will then work, and no hard links required.
legendary
Activity: 2618
Merit: 1007
Adding a "Data directory" field in the options I guess.

That way only maybe a "datadir.conf" file would be at the default location pointing to the actual location.
full member
Activity: 196
Merit: 100
I do think something needs pinning but it would be better served with a new thread where the first post is a step by step guide on how to apply the two alternative fixes (with a link to this thread)
Adding to the client itself... I am not sure what you mean there.
legendary
Activity: 1778
Merit: 1008
Anyone think that this information is worth pinning/adding into the bitcoin client?

pinning at least.

btw, i use the -datadir option, works fine.
Pages:
Jump to: