Bitcoin Forum
May 04, 2024, 09:46:06 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: 1 2 3 [All]
  Print  
Author Topic: I do not want blockchain data stored under Application Data folder, how to  (Read 41720 times)
viboracecata (OP)
Legendary
*
Offline Offline

Activity: 1316
Merit: 1000


Varanida : Fair & Transparent Digital Ecosystem


View Profile
February 14, 2012, 07:56:08 AM
 #1

I found that the folder named "Bitcoin" in "Application Data" is so big, and my C disk has not that much volume to hold it, I want to place them else where? How can I achieve this? I use client v0.4, thanks. 

iBuilding A Better Interneti
━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━

 
 █b
▐█=
║█
██                                         ¡▄▄▄▄▄▄▄▄┌
██M                                  ╒▄▄▄▄█▀    ▂▂ ╙▀▀▆▄
██▌                                ╓, ,██╨      ▀▀▀    ╜▀█▌
███                                ▀▀██╙     ▄▄▄▄▄      ╓█L
█ █▌                            ▄▄▄▄█▀          └▀▀▀▀█Φ█▀"
█▌ █▄                            ██▀           ▄█▀
▐▌  ▀▌                       ▀▄██▀            ▄▀
▐█     ▂▂▂                ▄  ▄█▀           ▄▄▀
 █▌  ╙▀▀▀▀▀█▄         ▄   ███▀     ▁▂▃▄▄▄█▀▀
  █▄        █▌    █▄  ██▄█▀        ▔▔╙▀▐█
   █▄       █▌ ▀▀████▀▀▀               ▐▌
    ▀█     █▀                          ▐▌
     ╙█▄  ▄▌                        ╓█ ▐█
       └▀██  ╓▄▄µ╓▄▄µ            ,▄█▀┘  █▌    ▄▄ ╓▄▄µ
         ██▄█▀▀███▀▀█▄       ╓▄▄█▀▀      ▀█▄█▀▀▀██▄╙▀█▄▄
          ▀╙    ▀▀▀  ▀▀▀  ▀▀▀▀╙           `      "▀▀  └╙
You Can See Me Now, Hi :}
VARANIDA

 
 
 
 
               ▄██   ▄███▄
              ▄███████  ██
              ██    ▀████▀
             ██
  ▄▄  ▄▄█████████████▄▄  ▄▄
▄███████████████████████████▄
█████████████████████████████
▀███████    █████    ███████▀
  ▀█████    █████    █████▀
   ███████████████████████
    █████▄  ▀▀▀▀▀  ▄█████
     ▀█████▄▄▄▄▄▄▄█████▀
        ▀▀█████████▀▀
|Hello Again
GWhitePaperG
GAnn ThreadG
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714815966
Hero Member
*
Offline Offline

Posts: 1714815966

View Profile Personal Message (Offline)

Ignore
1714815966
Reply with quote  #2

1714815966
Report to moderator
Timo Y
Legendary
*
Offline Offline

Activity: 938
Merit: 1001


bitcoin - the aerogel of money


View Profile
February 14, 2012, 12:35:26 PM
 #2

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.

GPG ID: FA868D77   bitcoin-otc:forever-d
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1075


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2012, 12:46:16 PM
 #3

If you are using and older version of Windows with NTFS then I can send you an "ln" executable (or the source code for it in c++) that I whipped up years ago (just calls the API function to make a hard link - note that being a hard link the other logical drive must be on the same physical hard drive).


Cheers,

Ian.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
jake262144
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
February 14, 2012, 02:29:10 PM
Last edit: February 14, 2012, 08:07:53 PM by jake262144
 #4

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\<your_user_name_here>\appdata\roaming\bitcoin" "d:\bitcoinData"
done!

This allows you to keep bitcoin client data anywhere, e.g. on a secure local fileserver.

EDIT::You should update your client to 5.2, there is no benefit in using the outdated version. Great many bugs were fixed since 4.0.

If you are using and older version of Windows with NTFS then I can send you an "ln" executable (or the source code for it in c++) that I whipped up years ago (just calls the API function to make a hard link - note that being a hard link the other logical drive must be on the same physical hard drive)...
Had you tried that yourself you'd know that bitcoin client crashes when using hard-linked directories.
Try your own tool or grab Sysinternals Junction from Microsoft and for crying out loud test your advice before posting.
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
February 14, 2012, 03:05:51 PM
 #5

How about just moving the whole folder to another drive and start the bitcoin client/server with the
Code:
-datadir=<new_data_dir_path>
option set?

The following link is mandatory for someone running bitcoin on their computers https://en.bitcoin.it/wiki/Running_Bitcoin
jake262144
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
February 14, 2012, 03:20:46 PM
Last edit: February 14, 2012, 03:55:27 PM by jake262144
 #6

How about just moving the whole folder to another drive and start the bitcoin client/server with the
Code:
-datadir=<new_data_dir_path>
option set? ...
This seems a bit of a band-aid to me as the modified path has to be specified at every start. Should OP use an unmodified shortcut (like the one in Start Menu) or launch the executable manually, the client will generate a new %appdata%\bitcoin directory.

Still, in dire need the -datadir parameter can be used with great success. Good thing you mentioned it psy.
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
February 14, 2012, 03:52:37 PM
 #7

Modify the shortcut that starts the client so it has the option and just click 2 times to open the app as usual?

If in windows, right click the Bitcoin shortcut icon and choose Properties.
On the Target field append -datadir=<dir> after the path to bitcoin that is already there(don't forget to enclose the new dir path in quotes if it contain spaces.
Save.
Click the icon and open Bitcoin with your new dir, now and forever.

Incredible how you say that using a software feature is a band-aid and at the same time suggest symlinks and registry changes to achieve the same result...
jake262144
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
February 14, 2012, 04:01:56 PM
 #8

Click the icon and open Bitcoin with your new dir, now and forever.
Provided only this modified shortcut is ever used.
Should an unmodified shortcut or the executable itself be invoked, this approach will fail.
An installer might overwrite the start menu shortcut during upgrade.

I'm not complicating things, I'm trying to point out potential problems.

I removed the line suggesting registry changes as I said this was a total overkill.
I can't see anything wrong with symlinks, that's a great feature of the new versions of Windows.
Then again, I agree that an approach requiring some command prompt action might be considered a bit geeky by the non-techie crowd.
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
February 14, 2012, 04:08:22 PM
 #9

The user just needs to modify the shortcut every time he updates the app.
If he's not capable of (remembering to) perform such a simple administration task he shouldn't be updating it on the first place Wink
jake262144
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
February 14, 2012, 04:15:55 PM
 #10

Ideally, path to the data files should be accessible in the client via the Settings -> Options menu.

The beauty of using a symlink is that it won't ever be broken by reinstalling the client. It is paid for by the necessity to type a few dozen characters into the elevated command prompt.
The biggest benefit of modifying shortcuts is simplicity. This approach is less bulletproof.
Both are acceptable solutions, enough said.

A bright side of messing with the registry... ugh, there is no bright side to that Cheesy
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 14, 2012, 04:22:21 PM
 #11

Ideally, path to the data files should be accessible in the client via the Settings -> Options menu.

Bingo and that setting should be stored in the bitcoin.conf (which should exist in all instances even if just set to defaults).


No problem with app data folder having config file but given:
a) the size of the blockchain
b) the need to keep secure and backup the wallet

the data folder should be a user defined option.

Then again I think the wallet should be separated from the daemon completely.  The wallet just being a front end that handles the GUI, keeps the wallet.dat file secure and "talks" to the daemon for everything else.
btc_artist
Full Member
***
Offline Offline

Activity: 154
Merit: 101

Bitcoin!


View Profile WWW
February 14, 2012, 04:50:31 PM
 #12

This does not help with the OP's problem directly, but the Bitcoin client should be split into two parts-- (1) a daemon that maintains a shared block chain and relays transactions for all users on the computer. (2) a wallet management program that users have to manage their wallet(s), send money etc.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1075


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 15, 2012, 06:12:46 AM
 #13

If you are using and older version of Windows with NTFS then I can send you an "ln" executable (or the source code for it in c++) that I whipped up years ago (just calls the API function to make a hard link - note that being a hard link the other logical drive must be on the same physical hard drive)...
Had you tried that yourself you'd know that bitcoin client crashes when using hard-linked directories.
Try your own tool or grab Sysinternals Junction from Microsoft and for crying out loud test your advice before posting.

Well I only mentioned a tool rather than what to do with it actually - the advice I would have given (if he was interested in the tool at all) would be to hardlink to the large file rather than to a directory and I *know* Bitcoin works with that because that is how I use it.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
viboracecata (OP)
Legendary
*
Offline Offline

Activity: 1316
Merit: 1000


Varanida : Fair & Transparent Digital Ecosystem


View Profile
February 15, 2012, 07:34:23 AM
 #14

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.

thank you so much, and it's helpful to me.

iBuilding A Better Interneti
━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━

 
 █b
▐█=
║█
██                                         ¡▄▄▄▄▄▄▄▄┌
██M                                  ╒▄▄▄▄█▀    ▂▂ ╙▀▀▆▄
██▌                                ╓, ,██╨      ▀▀▀    ╜▀█▌
███                                ▀▀██╙     ▄▄▄▄▄      ╓█L
█ █▌                            ▄▄▄▄█▀          └▀▀▀▀█Φ█▀"
█▌ █▄                            ██▀           ▄█▀
▐▌  ▀▌                       ▀▄██▀            ▄▀
▐█     ▂▂▂                ▄  ▄█▀           ▄▄▀
 █▌  ╙▀▀▀▀▀█▄         ▄   ███▀     ▁▂▃▄▄▄█▀▀
  █▄        █▌    █▄  ██▄█▀        ▔▔╙▀▐█
   █▄       █▌ ▀▀████▀▀▀               ▐▌
    ▀█     █▀                          ▐▌
     ╙█▄  ▄▌                        ╓█ ▐█
       └▀██  ╓▄▄µ╓▄▄µ            ,▄█▀┘  █▌    ▄▄ ╓▄▄µ
         ██▄█▀▀███▀▀█▄       ╓▄▄█▀▀      ▀█▄█▀▀▀██▄╙▀█▄▄
          ▀╙    ▀▀▀  ▀▀▀  ▀▀▀▀╙           `      "▀▀  └╙
You Can See Me Now, Hi :}
VARANIDA

 
 
 
 
               ▄██   ▄███▄
              ▄███████  ██
              ██    ▀████▀
             ██
  ▄▄  ▄▄█████████████▄▄  ▄▄
▄███████████████████████████▄
█████████████████████████████
▀███████    █████    ███████▀
  ▀█████    █████    █████▀
   ███████████████████████
    █████▄  ▀▀▀▀▀  ▄█████
     ▀█████▄▄▄▄▄▄▄█████▀
        ▀▀█████████▀▀
|Hello Again
GWhitePaperG
GAnn ThreadG
viboracecata (OP)
Legendary
*
Offline Offline

Activity: 1316
Merit: 1000


Varanida : Fair & Transparent Digital Ecosystem


View Profile
February 15, 2012, 07:46:09 AM
 #15

Again, thank you all above for your great patience and passion on solving the trouble.

In fact, I consider there will be some commands or option settings to help me to achieve this aim, but seems it's not that easy, for us, engineers, it's not so bad to do those operations, but I think it would not be simple for one not familiar with computers, maybe in the future the words with btc_artist can be considered by the dev team.

thanks.

iBuilding A Better Interneti
━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━

 
 █b
▐█=
║█
██                                         ¡▄▄▄▄▄▄▄▄┌
██M                                  ╒▄▄▄▄█▀    ▂▂ ╙▀▀▆▄
██▌                                ╓, ,██╨      ▀▀▀    ╜▀█▌
███                                ▀▀██╙     ▄▄▄▄▄      ╓█L
█ █▌                            ▄▄▄▄█▀          └▀▀▀▀█Φ█▀"
█▌ █▄                            ██▀           ▄█▀
▐▌  ▀▌                       ▀▄██▀            ▄▀
▐█     ▂▂▂                ▄  ▄█▀           ▄▄▀
 █▌  ╙▀▀▀▀▀█▄         ▄   ███▀     ▁▂▃▄▄▄█▀▀
  █▄        █▌    █▄  ██▄█▀        ▔▔╙▀▐█
   █▄       █▌ ▀▀████▀▀▀               ▐▌
    ▀█     █▀                          ▐▌
     ╙█▄  ▄▌                        ╓█ ▐█
       └▀██  ╓▄▄µ╓▄▄µ            ,▄█▀┘  █▌    ▄▄ ╓▄▄µ
         ██▄█▀▀███▀▀█▄       ╓▄▄█▀▀      ▀█▄█▀▀▀██▄╙▀█▄▄
          ▀╙    ▀▀▀  ▀▀▀  ▀▀▀▀╙           `      "▀▀  └╙
You Can See Me Now, Hi :}
VARANIDA

 
 
 
 
               ▄██   ▄███▄
              ▄███████  ██
              ██    ▀████▀
             ██
  ▄▄  ▄▄█████████████▄▄  ▄▄
▄███████████████████████████▄
█████████████████████████████
▀███████    █████    ███████▀
  ▀█████    █████    █████▀
   ███████████████████████
    █████▄  ▀▀▀▀▀  ▄█████
     ▀█████▄▄▄▄▄▄▄█████▀
        ▀▀█████████▀▀
|Hello Again
GWhitePaperG
GAnn ThreadG
fizzisist
Hero Member
*****
Offline Offline

Activity: 720
Merit: 525



View Profile WWW
September 10, 2012, 05:31:12 AM
 #16

I've had to google this twice over the past several months, and was surprised both times to not find this in the wiki. Is this still the best way to accomplish this? Should it be added? (Here, probably.) I would prefer someone more familiar with the workings of windows to write it up (see first sentence for my lack of credentials on the subject).

tinman951
Full Member
***
Offline Offline

Activity: 149
Merit: 100


View Profile
September 16, 2012, 07:05:13 PM
 #17

What would I put into the bitcoin.conf file to change it to look for the blockchain in H:\Users\username\AppData\Roaming\Bitcoin  ?  The wiki doesn't mention it at all.

Free micro bitcoins: http://www.bitvisitor.com/?ref=1DFw1VncjVhqdg6GWoQ6Qtc5ncR5RHXxfP
Donate BTC: 18b94MMTWd7bWaUWcq7VHmizgswP2dK6fM
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
September 21, 2012, 06:22:39 AM
 #18

What would I put into the bitcoin.conf file to change it to look for the blockchain in H:\Users\username\AppData\Roaming\Bitcoin  ?  The wiki doesn't mention it at all.
I don't think you can change that?
Chaz
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
September 21, 2012, 09:01:00 AM
 #19

An option in the GUI is a must I think.  Blockchain just hit 3GB and is increasing rapidly....

1FsQJtY4vbvbkJj4Pd869rDcbFmu11RHge
tinman951
Full Member
***
Offline Offline

Activity: 149
Merit: 100


View Profile
September 22, 2012, 12:56:54 AM
 #20

I tried Timo Y's idea  but I have three .dat files:
blk0001.dat
blk0002.dat
blkindex.dat

and I wasn't sure how they would work out. 

Free micro bitcoins: http://www.bitvisitor.com/?ref=1DFw1VncjVhqdg6GWoQ6Qtc5ncR5RHXxfP
Donate BTC: 18b94MMTWd7bWaUWcq7VHmizgswP2dK6fM
fizzisist
Hero Member
*****
Offline Offline

Activity: 720
Merit: 525



View Profile WWW
September 23, 2012, 06:16:41 PM
 #21

I tried Timo Y's idea  but I have three .dat files:
blk0001.dat
blk0002.dat
blkindex.dat

and I wasn't sure how they would work out. 

jake262144's trick is what I used. It lasts perfectly through upgrades and does exactly what I wanted.

Joshwaa
Hero Member
*****
Offline Offline

Activity: 497
Merit: 500



View Profile
November 09, 2012, 09:10:27 PM
 #22

I think Tinman is asking if he has to link each of the 3 files.

Like what I said : 1JosHWaA2GywdZo9pmGLNJ5XSt8j7nzNiF
Don't like what I said : 1FuckU1u89U9nBKQu4rCHz16uF4RhpSTV
saqwe
Sr. Member
****
Offline Offline

Activity: 700
Merit: 250



View Profile
November 19, 2012, 08:52:44 AM
 #23

yeah wtf,
 downlaoding the initial blockchanin is a mess! i corrupted three hard disks and even with the initial file from sourceforge i am trying to it for over a month now here in vienna/austra/europe

so i cannot stress enough the following proposal:

Ideally, path to the data files should be accessible in the client via the Settings -> Options menu.

The beauty of using a symlink is that it won't ever be broken by reinstalling the client. It is paid for by the necessity to type a few dozen characters into the elevated command prompt.
The biggest benefit of modifying shortcuts is simplicity. This approach is less bulletproof.
Both are acceptable solutions, enough said.

A bright side of messing with the registry... ugh, there is no bright side to that
Fiyasko
Legendary
*
Offline Offline

Activity: 1428
Merit: 1001


Okey Dokey Lokey


View Profile
February 03, 2013, 02:32:54 PM
 #24

I feel that this need a necrobump, I ran into this solution, And damn, Jake262144's fix is PERFECT
It creates a shortcut to tell your bitcoin client to go someplace else, BTW, if your blockchain downloads really really slow, Blame your harddrive

http://bitcoin-otc.com/viewratingdetail.php?nick=DingoRabiit&sign=ANY&type=RECV <-My Ratings
https://bitcointalk.org/index.php?topic=857670.0 GAWminers and associated things are not to be trusted, Especially the "mineral" exchange
taltamir
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
February 21, 2013, 12:00:43 AM
Last edit: February 21, 2013, 01:19:57 AM by taltamir
 #25

My data dir is 13.4GB... That is a LOT of expensive SSD space. My SSD is very nearly full now
Junction are workable but aside from being advanced knowledge they are also hard to change later on (if I want to move it again to a new location).

1. conf file should be stored in same directory as executable, not in data dir.
2. conf file should specify the data dir (as either relative or absolute path), which should be changable via GUI.
Fiyasko
Legendary
*
Offline Offline

Activity: 1428
Merit: 1001


Okey Dokey Lokey


View Profile
February 21, 2013, 04:44:14 PM
 #26

Anyone think that this information is worth pinning/adding into the bitcoin client?

http://bitcoin-otc.com/viewratingdetail.php?nick=DingoRabiit&sign=ANY&type=RECV <-My Ratings
https://bitcointalk.org/index.php?topic=857670.0 GAWminers and associated things are not to be trusted, Especially the "mineral" exchange
arklan
Legendary
*
Offline Offline

Activity: 1778
Merit: 1008



View Profile
February 21, 2013, 05:04:43 PM
 #27

Anyone think that this information is worth pinning/adding into the bitcoin client?

pinning at least.

btw, i use the -datadir option, works fine.

i don't post much, but this space for rent.
taltamir
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
February 21, 2013, 06:31:02 PM
 #28

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.
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
February 22, 2013, 08:34:08 AM
 #29

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.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
February 22, 2013, 10:27:05 AM
 #30

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.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
taltamir
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
February 22, 2013, 06:10:59 PM
 #31

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
proudhon
Legendary
*
Offline Offline

Activity: 2198
Merit: 1311



View Profile
April 09, 2013, 02:25:18 AM
 #32

Any word on whether the option to specify the blockchain location is getting worked into the main client?

Bitcoin Fact: the price of bitcoin will not be greater than $70k for more than 25 consecutive days at any point in the rest of recorded human history.
Gamesfreak13563
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
August 16, 2013, 11:57:25 PM
 #33

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.
saqwe
Sr. Member
****
Offline Offline

Activity: 700
Merit: 250



View Profile
August 18, 2013, 02:53:45 AM
 #34

Any word on whether the option to specify the blockchain location is getting worked into the main client?

+1
BombaUcigasa
Legendary
*
Offline Offline

Activity: 1442
Merit: 1000



View Profile
August 18, 2013, 10:06:12 AM
 #35

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.
Fiyasko
Legendary
*
Offline Offline

Activity: 1428
Merit: 1001


Okey Dokey Lokey


View Profile
August 18, 2013, 04:34:35 PM
 #36

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\<your_user_name_here>\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!

http://bitcoin-otc.com/viewratingdetail.php?nick=DingoRabiit&sign=ANY&type=RECV <-My Ratings
https://bitcointalk.org/index.php?topic=857670.0 GAWminers and associated things are not to be trusted, Especially the "mineral" exchange
theta
Full Member
***
Offline Offline

Activity: 164
Merit: 100


View Profile
December 22, 2013, 02:48:11 PM
 #37

A more user-friendly way of essentially the same thing is using this tool:
http://bitsum.com/junctionmaster.php
epivitoras1
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
January 23, 2014, 09:50:05 AM
 #38

thank you for all the replies !!! i just transfered my bitcoin,litecoin,dogecoin appdata folders to my external hard drive disk !!
thank you ! Grin
taltamir
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
January 23, 2014, 11:21:50 AM
Last edit: January 23, 2014, 11:34:01 AM by taltamir
 #39

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
Wusolini
Legendary
*
Offline Offline

Activity: 1190
Merit: 1000


no need to carry heavy money bags anymore


View Profile
January 25, 2014, 11:36:20 PM
 #40

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

litecoinpadawan
Newbie
*
Offline Offline

Activity: 35
Merit: 0


View Profile
January 26, 2014, 06:38:34 AM
 #41

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\<your_user_name_here>\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.
hll
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 26, 2014, 11:34:12 AM
 #42

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 )
asdlolciterquit
Hero Member
*****
Offline Offline

Activity: 1666
Merit: 565


View Profile
February 27, 2014, 09:54:52 AM
 #43

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!
mrjoebruno
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
July 26, 2014, 03:10:51 PM
 #44

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

njcarlos
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250


View Profile
October 11, 2014, 03:33:12 AM
 #45

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\<your_user_name_here>\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.
GlooBoy
Copper Member
Member
**
Offline Offline

Activity: 97
Merit: 10


Leave everything to me!


View Profile WWW
October 18, 2014, 03:41:30 PM
 #46

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\<your_user_name_here>\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




GLooBoy @ OTC--LBC--BitRated -- GPG ID: A23D510BD6E310D3
Beginner and Expert Level FREE Escrow for All | GiftCards for Crypto -- Cryfter.com from 2012 to 2017
Pages: 1 2 3 [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!