Easy docker application for taking tezedge snapshots in a set interval. The application is designed to be run as a service inside a docker-compose. The compose should at least include a tezedge node and the snapshotting app. See the included docker-compose.
Installed docker and docker-compose.
tezedge_<network_name><date>-<time><block_hash>_<context_type>.<snapshot_type>
tezedge_granadanet_20211108-104156_BLo9BSrp7S8HnrX43vK3LdHpHUAoTVSqFACtzczjfP7a2CExUZe_irmin.archive
The snapshot above comes from granadanet
and was taken on the 8th of November 2021
at 10:41:56 UTC
and at block BLo9BSrp7S8HnrX43vK3LdHpHUAoTVSqFACtzczjfP7a2CExUZe
. The snapshot was taken on a node running with the irmin
context and the snapshot type is archive
.
- Clone this repository
git clone https://github.com/tezedge/tezedge-snapshots.git
- Set a few environmental variables. (This step is optional as you can set the environment variables before executing the command)
export NODE_HOSTNAME_OR_IP=<public IP address of the machine you run the snapshotter or its domain>
export TEZOS_NETWORK=<tezos network to connect to>
export TEZEDGE_VOLUME_PATH=<path to the tezedge databases>
export TEZEDGE_SNAPSHOTS_VOLUME_PATH=<path to the directory you want your snapshots saved to>
- Run the docoker-compose
docker-compose -f docker-compose.yml up -d
- Alternatively, you can combine step 2 and 3 into a single one liner
NODE_HOSTNAME_OR_IP=116.202.128.230 TEZOS_NETWORK=granadanet TEZEDGE_VOLUME_PATH="/path/to/tezedge" TEZEDGE_SNAPSHOTS_VOLUME_PATH="/path/to/snapshots" docker-compose -f docker-compose.yml up -d
snapshots-target-directory
: The path to the target directory for the snapshotstezedge-database-directory
: The path to the running tezedge node database directorycheck-interval
: Interval in seconds to take check the node's headsnapshot-frequency
: The time between two snapshots in secondssnapshot-capacity
: The maximum number of snapshots kept on the machinetezedge-node-url
: The url to the tezedge node for the snapshotsnetwork
: The name of network tezedge is connecting tonode-container-name
: The name of the container the tezedge node resides inmonitoring-container-name
: The name of the container the tezedge monitoring resides inlog-level
: Set logging levelsnapshot-type
: The type of the snapshot to take. One of the following values: archive, full, all (take all snapshot types)full-snapshot-image
: The tezedge image used to create the full snapshot. Defaults to: "tezedge/tezedge:latest"
server {
listen 80 default_server;
listen [::]:80 default_server;
add_header Access-Control-Allow-Origin *;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
root /snapshots/;
autoindex on;
autoindex_format json;
}
}