You can simply follow the install guide for Bitcoin Core addrindex and reindex existing blockchain as explained in the document.
This would preserve existing blockchain data and add an address index (and transaction index, if your previous Bitcoin Core did not have
txindex=1). Reindexing of mainnet blockchain takes hours, just so that you know.
Going back is equally simple: remove
txindex=1, if you don’t need it) and use your official release of Bitcoin Core.
- It is not always possible to downgrade Bitcoin Core and keep the blockchain. This means that a change from v0.13 to v0.12 probably won’t work as it wouldn’t with the official Bitcoin Core. Take a snapshot or make a copy of your blockchain (and wallet) if you experiment with this.
- You cannot build an index from a pruned blockchain, so that feature must be disabled. A full “thick” copy of the blockchain is required.