Backup ADA node

Hi,all. I wanna backup ADA node(I’ve installed cardano-sl repository).
In bitcoin or ethereum(parity), I can backup and restore with saving following directory.
bitcoin: $HOME/.bitcoin/wallet.dat
ethereum: $HOME/.local/share/io.parity.ethereum/keys
Anything similar in ADA node?

Ideally you’d want to restore using your seed words, but ofcourse there are use cases where backing up of physical folders is essential. Assuming you’ve cloned cardano-sl to $HOME/cardano-sl and used defaults to connect to mainnet wallet:

  • To backup the encrypted key and Wallet checkpoint information, the location would be $HOME/cardano-sl/state-wallet-mainnet/secret.key and $HOME/cardano-sl/state-wallet-mainnet/wallet-db-acid.

  • To backup the local copy of blockchain DB, the location would be $HOME/cardano-sl/state-wallet-mainnet/db

Hope this helps.

Thanks for your replies.
I can restore wallet with seeds.
But I wonder I can restore all generated addresses with seeds.
So i’m finding simlar with bitcoin or ethereum.
wallet-db-acid contains all generated addresses and its data?

Yes, restoring with seed make all the ‘used’ generated addresses available to your wallet.

Not exactly, I would look at it like a cache (also, it has to match your secret.key) which maintains lookups for historical events and checkpoints for your node’s wallet. However, if restoring using seed is a viable option for you, it is definitely the recommended approach.

If you mean ‘data’ from blockchain, that would recide in the ‘db’ folder mentioned above.

I’m a exchange developer. I’ve used cardano-sl for ADA.
In exchange, it generated lots of addressed for users.
But user can or not deposit. I mean, generated addressed could have balances or no.
But i wanna restore all addresses even if it has no balance.
Can i do it with seeds?

And ‘data’ means private keys of addresses or sth similar, not blockchain data.

Yes - The unused addresses will start appearing once there is a tx made against them.
It wouldnt hurt to backup physical folder in any case (but the problem with that approach is they could get incompatible between current and future versions) - recovering from which could get a bit tedious. Hence, recommend to use seeds based approach :slight_smile:

Thanks for your kind help.

1 Like