Cant start bitcoind - "Block files have previously been pruned" I installed bitcoin, following this instructions.

I mostly used it with bitcoin-qt -testnet options, even made a few transactions in testnet. I am using the pruned mode.

Now I want to run the bitcoind and then connect bitcoin-cli to it.

But when I run the following command: bitcoind -testnet, I get the following output:

punnysher@punnysher ~ $ bitcoind -testnet

2018-11-16T09:16:40Z Bitcoin Core version v0.17.0.1 (release build)

2018-11-16T09:16:40Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -&gt; setting -whitelistrelay=1

2018-11-16T09:16:40Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures.

2018-11-16T09:16:40Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463

2018-11-16T09:16:40Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation

2018-11-16T09:16:40Z Using RdRand as an additional entropy source

2018-11-16T09:16:40Z Default data directory /home/punnysher/.bitcoin

2018-11-16T09:16:40Z Using data directory /home/punnysher/.bitcoin/testnet3

2018-11-16T09:16:40Z Using config file /home/punnysher/.bitcoin/bitcoin.conf

2018-11-16T09:16:40Z Using at most 125 automatic connections (1024 file descriptors available)

2018-11-16T09:16:40Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements

2018-11-16T09:16:40Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements

2018-11-16T09:16:40Z Using 4 threads for script verification

2018-11-16T09:16:40Z scheduler thread start

2018-11-16T09:16:40Z HTTP: creating work queue of depth 16

2018-11-16T09:16:40Z No rpcpassword set - using random cookie authentication.

2018-11-16T09:16:40Z Generated RPC authentication cookie /home/punnysher/.bitcoin/testnet3/.cookie

2018-11-16T09:16:40Z HTTP: starting 4 worker threads

2018-11-16T09:16:40Z Using wallet directory /home/punnysher/.bitcoin/testnet3/wallets

2018-11-16T09:16:40Z init message: Verifying wallet(s)...

2018-11-16T09:16:40Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)

2018-11-16T09:16:40Z Using wallet wallet.dat

2018-11-16T09:16:40Z BerkeleyEnvironment::Open: LogDir=/home/punnysher/.bitcoin/testnet3/wallets/database ErrorFile=/home/punnysher/.bitcoin/testnet3/wallets/db.log

2018-11-16T09:16:40Z Cache configuration:

2018-11-16T09:16:40Z * Using 2.0MiB for block index database

2018-11-16T09:16:40Z * Using 8.0MiB for chain state database

2018-11-16T09:16:40Z * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)

2018-11-16T09:16:40Z init message: Loading block index...

2018-11-16T09:16:40Z Opening LevelDB in /home/punnysher/.bitcoin/testnet3/blocks/index

2018-11-16T09:16:40Z Opened LevelDB successfully

2018-11-16T09:16:40Z Using obfuscation key for /home/punnysher/.bitcoin/testnet3/blocks/index: 0000000000000000

2018-11-16T09:16:48Z LoadBlockIndexDB: last block file = 154

2018-11-16T09:16:48Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=2233, size=44632870, heights=1441380...1443684, time=2018-10-31...2018-11-16)

2018-11-16T09:16:48Z Checking all blk files are present...

2018-11-16T09:16:48Z LoadBlockIndexDB(): Block files have previously been pruned

2018-11-16T09:16:48Z : You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.

Please restart with -reindex or -reindex-chainstate to recover.

: You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.

Please restart with -reindex or -reindex-chainstate to recover.

2018-11-16T09:16:48Z Aborted block database rebuild. Exiting.

2018-11-16T09:16:48Z Shutdown: In progress...

2018-11-16T09:16:48Z scheduler thread interrupt

2018-11-16T09:16:48Z Shutdown: done

punnysher@punnysher ~ $
The message says

2018-11-16T09:16:48Z LoadBlockIndexDB(): Block files have previously been pruned
2018-11-16T09:16:48Z : You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.
Please restart with -reindex or -reindex-chainstate to recover.

If you have been running in pruned mode, bitcoind has been pruning the blockchain. This means it has discarded data to save disk space.
To run in non-pruned mode you must recover the missing data. The method provided is to download the entire blockchain again.
The only obvious alternative is, presumably, to run in pruned mode.

Related questions:

How can I run bitcoind in pruning mode?

Related links:

https://bitcointalk.org/index.php?topic=1599458.0 (August 2016)


OK, I have a question. Say: I enabled prune mode and Bitcoin Core effectively started working in this mode. But it is one way ticket if I ever want to go back to 'full' mode I need to download and verify whole blockchain once again there is no shortcuts?

Yes, you will have to redownload the entire blockchain, there are no shortcuts