As Bytecoin's blockchain size increases, many may find it difficult to allow a set amount of hard disk space to store the database. Also, the entire blockchain is locally needed only when using a local wallet. Occupying the computer hard disk space can also slow down your computer. What if you can store the entire blockchain externally? Here, I present two simple methods to sync the entire Bytecoin blockchain to an external hard disk.
Method 1:
The process is slightly different on Windows and Linux (Ubuntu). Here, I will explain how to do this in Ubuntu.
Step 1: Make a new folder on your external hard disk by the name "Bytecoin"
Step 2: Download the Bytecoin Reference Client (SimpleWallet) or GUI wallet from here: https://bytecoin.org/downloads/
Step 3: Unzip the file into the Downloads folder
Step 4: Open a new Terminal window
Step 5: cd into the directory of "Bytecoin" (The one you unzipped in Step 3). Use "ls" command to view a file called "bytecoind". bytecoind is the daemon of the Bytecoin Blockchain. There are custom command options with bytecoind. For more information on bytcoind options, use the terminal command "bytecoind --help"
Step 6: Essentially, you need to tell the daemon to locate the blockchain files from the external hard disk. To do this, copy the following command and run it in the terminal:
"./bytecoind --data-dir /media/user_name/external_hard_disk_name/Bytecoin"
(Remember to update this command with your username and your external hard disk name. Letters in Paths are casesenstive.)
Step 7: Sit back and relax. depending on your internet connection, this can take a while. The blockchain will now start to sync directly on the external hard disk.
Method 2:
If you are fairly comfortable with Linux, there is another faster way to sync the blockchain by downloading the entire blockchain file using this offical Bytecoin github repository (Thanks to JaysonH91): https://github.com/bytecoin-dev/blockchain-download
However, this will only download the entire blockchain to the default ".bytecoin" folder in your home folder. To view this, press "ctrl+h" when you are in home folder. It will show you all the hidden files on Ubuntu.
Remedy: Editing the macOS_linux_download.sh file from https://github.com/bytecoin-dev/blockchain-download . Use any text editor to edit this document.
Step 1: Edit line 43 to look like this
line 43: cd /media/user_name/external_harddisk_name/Bytecoin (make sure this new folder in the external hard disk is empty)
Step 2: Delete line 46, 47 and 48 and save the file
line 46: mkdir BackupBlockchain
line 47: mv blockindexes.bin BackupBlockchain
line 48: mv blocks.bin BackupBlockchain/
Step 3: Now run the macOS_linux_download.sh in the terminal using the command
"./macOS_linux_download.sh" or "bash macOS_linux_download.sh".
The process will start downloading the blockindexes.bin and blocks.bin file to "/media/user_name/external_harddisk_name/Bytecoin" folder.
Using the wallet
Once the entire blockchain is synced using any of the two methods, you can cd into the Bytecoin simple wallet or GUI wallet folder and run the following command (without quotes):
" ./bytecoind --data-dir /media/user_name/external_harddisk_name/Bytecoin "
The Bytecoin GUI and Command Line wallets will automatically detect the daemon running in the background. The (bytecoind) daemon will fetch and write the blockchain data from and to the external hard disk, while you use the wallet.
I hope this post helps you save some precious hard disk space. Local wallets are safer than online wallets and the method above makes it easier to use local wallets. Method 1 can also be used to sync other blockchains, like Monero without any issues. If you have any doubts, leave a reply to this post, I can help clarify any doubts.
Very good info, i will try and let u know how it goes...!!
Congratulations @jeev! You have received a personal award!
1 Year on Steemit
Click on the badge to view your Board of Honor.
Congratulations @jeev! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!