My bitcoin Tor node recently suffered a hard disk failure. After changing the hardware, re-installing Linux and
bitcoind, setting up Tor for a hidden service, I realized (obviously !) that my external onion address had to change. So my question is: what do I need to do to ensure I keep the same onion address the next time my node suffers unrecoverable failure? Looking at the directory
/var/lib/tor/bitcoin_service, I can see two files
private_key where the former does contain my onion address (which I think is related to my private key). So I am guessing all I need to do is back up these files and restore them in my new system (while setting up
bitcoin.conf appropriately of course, as explained here). Do I need more?
EDIT: it seems that simply importing the files
private_key into a new system (having properly defined
bitcoin.conf) does not work (the node fails to connect to Tor network). So Tor probably maintains additional state apart from these two files. So the question remains open: how to set up a new system so as to keep existing onion address.