How to backups a CCN
The data stored by aleph.im Core Channel Nodes (CRN) is redundant and can be retrieved from the network in case of emergencies. However, there are a few important factors to consider in order to minimize node downtime, safeguard reputation, and maximize rewards.
What to back up
The first essential step is to backup the keys used in the P2P protocol by the Core Channel Node.
These keys are located
pyaleph/keys/* directory. It is sufficient to perform this backup only once, as these keys will not change.
⚠️ Reinstalling a node with the same IPv4 will fail if these keys change, as other nodes will only trust the same key for a duration of many hours or days.
The second aspect you may consider backing up is the file storage. If you are using the provided
file, the file storage is located in the Docker volume named
pyaleph-ipfs. It is acceptable to have an incomplete
backup, as it enables faster resynchronization from the network by eliminating the need to download those files again.
Additionally, it is recommended to backup the PostgreSQL database stored in the Docker volume
restoring your node, ensure that the file storage mentioned above is not older than this database volume.
Performing backups of the file storage and the PostgreSQL database will enable faster node recovery compared to downloading and processing all messages from the network. However, keep in mind that there is always a possibility of relying solely on network synchronization.
The choice of backup solution depends on your specific installation.
A popular approach is to install run the Docker volumes on the BTRFS or ZFS filesystem and utilizing the snapshots provided by those file systems. Others prefer running Core Channel Nodes in virtual machines and utilizing the snapshot features of the QCOW image format.
An alternative using regular tools is to use the following commands: