Tutorial: How to manually download latest pruned ChainDB [GOOGLE CLOUD]

I obtained a gain of 80% to 90% in speed for the initiation of mining

It is not mandatory, but it helps speed up the mining initiation process.

Using other services like VULTR and DIGITAL OCEAN, it will not help you much … but with GOOGLE CLOUD it will certainly help you.

1 Like

wget -O - “link to where ChainDB…tar.gz file is hosted” -q --show-progress | tar -xzf -

this command downloads and extracts at the same time. Smaller VPS can run out of diskspace if you download first and extract it will be 12 GB plus 13,5GB which is already too much space.

2 Likes

Nice, thanks for the contribution. This is a totally viable solution for VPS with a size of 25GB HD.I noticed something very important, it is better to delete the ChainDB folder before exporting the new files. When I didn’t do that, somehow there were some useless files inside the ChainDB folder, increasing the folder size by 2gb compared to other nodes.

Yes, you HAVE to delete the existing folder, if you don’t there could be problems with the node.

Conflicting data

1 Like

Does this mean that with this you don’t need to wait to the full chain database to be downloaded at the beginning? (took me more than 48 hours)

1 Like

I did this process only using google’s cloud service, however, with other cloud services you don’t have to.

I saved time in updating the database.

I’ve tried to archive the ChainDB folder from one of my machines (Google Cloud) and unarchive it to my Raspberry Pi, but after restarting it stucks on “Pruning”. I re-installed NKN, it’s doing the same. Any idea why?

1 Like

I don’t know for sure, but one time I did the same thing between two VPS and it went wrong.
Download directly from the link, delete the ChainDB folder before extract the ChainDB_pruned_latest.tar.gz file

1 Like

Fix your transfer unpack command with this one, so it’s done in one go, not wasting space on a small storage VPN.

wget -O - “https://nkn.org/ChainDB_pruned_latest.tar.gz” -q --show-progress | tar -xzf -

Also no need to delete the ChainDB file after the transfer.

Hi, i´m getting this message when i run that script:

“gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now”

received the same message, does anyone have an answer?

Maybe in this topic

Is this software available for Windows OS yet? I am facing the pruning problem and my node status shows as “Not started”. Was syncing well all day long but just broke down a few mins ago.

image

Hi,Can I do it when vps mining?
If so, when I reboot my vps, the mining program will automatic run again?
Thank you !

wget -O - “https://nkn.org/ChainDB_pruned_latest.tar.gz” -q --show-progress | tar -xzf -

There’s a problem with double quotes if you just copy paste the link. Delete and retype the quotes

I’m sure I’m an idiot, but what exactly am I supposed to type on Step #5? Thank you.

username@nkn-full-node-1-vm-1:~$ sudo su
root@nkn-full-node-1-vm-1:/home/username# cd
root@nkn-full-node-1-vm-1:~# cd nkn/nkn-commercial/services/nkn-node/
bash: cd: nkn/nkn-commercial/services/nkn-node/: No such file or directory
root@nkn-full-node-1-vm-1:~# rm -r ChainDB
rm: cannot remove ‘ChainDB’: No such file or directory
root@nkn-full-node-1-vm-1:~# cd username@nkn-full-node-1-vm-1
bash: cd: username@nkn-full-node-1-vm-1: No such file or directory

How would you do this on a windows node?

I am having a similar issue. Did you figure it out?

Same issue here, anyone figured it out yet??