Copy database folder from one node to another, exclude/empty ledger first?

Hi All,

I remember to have read somewhere that before copying a database folder from one node to another (/opt/cardano/cnode/db) you should empty the ledger first (/opt/cardano/cnode/db/ledger), because this data is specifically meant for the system that the db is runnig on.
On the other hand I see various posts that kind of indicate that you can simply copy the entire folder (including the ledger) without issues from one node to another… even between relay and BP.

Can someone help me understand what to do here? Thanks in advance!


Cardano.Amsterdam (AMS02)


Try to copy all db folder, in case u will have issues then u can delete the ledger folder

It’s the best way to test


Thanks Alex,

Did you actually do this before?.. :slight_smile:

Nope, I didn’t tried

I ve done it several times, never had an issue.

1 Like

Hi thijs , this is something that i am about to do in future for sure, also i am a beginner on cardano, I have already setup cardano node and wallet on my system.

  1. I wanted to know that how can i access this folder ?
  2. Do you take regular backups of this db ?
    Any kind of help would mean a lot. Thanks in advance @thijs

Hi AkshitV,

  1. You can access the folder on the filesystem, in our case /opt/cardano/cnode/db.

  2. Yes but there’s no need to have multiple copies, hence I back-up one node in full, including the db to an offsite location.
    My automation scripts can deploy a new server from scratch in ~hrs, depending on compile time. Having the db needing to sync for a day or so would mean a lot of downtime in case of a disaster.

The db copy method has now become a integral part of our rolling update mechanism and it works great.