Backup/restore node instance
Backing up and restoring Kaly
Last updated
Backing up and restoring Kaly
Last updated
In a decentralized blockchain, data replicates between nodes so it's not lost. But backing up configuration and data ensures a smoother recovery from corrupted data or other failures.
The genesis file for a network must be accessible on every node. We recommend storing the genesis file under source control.
If installed locally, the default data location is the Kaly installation directory.
Use the command line option to pass the path to Kaly.
Having some data reduces the time to synchronize a new node. You can perform periodic backups of the data directory and send the data to your preferred backup mechanism. For example, cron
job and rsync
, archives to the cloud such as s3, or tar.gz
archives.
To restore data:
If the node is running, stop the node.
If required, move the data directory to another location for analysis.
Restore the data from your last known good backup to the same directory.
Ensure user permissions are valid so you can read from and write to the data directory.
Restart the node.
If log messages signify a corrupt database, the cleanest way to recover is:
Stop the node.
Restart the node.
The process for finding peers after restarting is the same as for [finding peers after upgrading and restarting].
Restore the data from a .