Updated 2019-09-13

Backups

In a decentralized blockchain, data is replicated on other nodes so cannot be lost. However, backing up configuration and data ensures a smoother recovery.

Genesis File

The genesis file for a network must be accessible on every node. We recommend the genesis file is stored under source control.

Data Backups

We recommend mounting a separate volume to store data. Use the --data-path command line option to pass the path to Besu.

Having some data reduces the time to synchronise a new node. Periodic backups can be performed of the data directory and the data sent to your preferred backup mechanism. For example, cron job and rsync, archives to cloud such as s3, or tar.gz archives.

Data Restores

To restore data:

  1. If the node is running, stop the node.
  2. If required, move the data directory to another location for analysis.
  3. Restore the data from your last known good backup to the same directory.
  4. Ensure user permissions are valid so the data directory can be read from and written to.
  5. Restart the node.

Corrupted Data

If log messages indicate a corrupt database, the cleanest way to recover is:

  1. Stop the node.
  2. Restore the data from a previous backup.
  3. Restart the node.

Finding Peers on Restarting

The process for finding peers on restarting is the same as finding peers after upgrading and restarting.