WAX snapshots by WeCan.dev

WeCan provides raw WAX snapshots

Nodeos was configured with: chain-state-db-size-mb = 131000

Nodeos versions compatible with the snapshots: 2.0.8-2.0.13

Snapshots are available at https://backup.wecan.dev/wax/ , and below are individial links for every chain.

Keep in mind that the format of snapshots is raw uncompressed, so it may take some time to download them.

The snapshot dates are represented in epoch dates e.g. "1650022193" equals to "Friday, April 15, 2022 11:29:53 AM".

Use https://www.epochconverter.com/ for dates conversion.

Nodeos snapshot restore is described here: How to restore snapshot with full history

WAX Mainnet full history

WAX Testnet full history


Atomic Assets backups for WAX.

Postgres database backup was taken from Postgres 13.

The backup was taken with command "pg_dump -Fc -Z 0"

thus in order to restore the dump this flag must be used as well "pg_restore --verbose -Fc"

The database dates are also represented in epoch dates e.g. "atomic.mainnet.1650022193.dump".

WAX Mainnet Atomic Assets DB

WAX Testnet Atomic Assets DB


Hyperion Elasticsearch snapshots can be downloaded here too.

Elasticsearch snapshots were cut from Elastic version 7.16.3 which should be compatible with the newer Elastic versions

The compatibility chart can be found here: Elasticsearch snapshot-restore

WAX Mainnet Hyperion Elasticsearch

WAX Testnet Hyperion Elasticsearch


Usage examples

Wget HTTP recursively into directory:

      mkdir -p /srv/wax/data
      cd /srv/wax/data
      wget -r -nH -np -A "*.log,*.index,snapshot*.bin" -R "*html*,*.txt,shared_memory.bin" https://backup.wecan.dev/wax/mainnet/1650022193/
    

To resume wget download in case of connection interruption:

      wget -c -r -nH -np -A "*.log,*.index,snapshot*.bin" -R "*html*,*.txt,shared_memory.bin" https://backup.wecan.dev/wax/mainnet/1650022193/
    

Parallel downloading with aria2c (no recursive list supported yet):

      mkdir -p /srv/data
      aria2c -c -s 10 -x 10 --file-allocation=none https://backup.wecan.dev/wax/mainnet/1650022193/state-history/trace_history.log
    

Restore AA postgres dump example:

      1. PGPASSWORD=***** dropdb -U aa_user "api-wax-mainnet-atomic-1"'
      2. PGPASSWORD=***** createdb -U aa_user "api-wax-mainnet-atomic-1"
      3. PGPASSWORD=***** pg_restore --verbose -Fc -j 16 -U aa_user --no-owner --role=aa_user -C -d api-wax-mainnet-atomic-1 /snapshots/atomic.mainnet.1650022193.dump
    

Adding WeCan Elasticsearch snapshot repository and restoring a snapshot (testnet or mainnet accordingly) (can be done over Kibana entierly):

      1. Add this to each Elastic node config:
          vim /etc/elasticsearch/elasticsearch.yml
          repositories.url.allowed_urls: "https://backup.wecan.dev/wax/hyperion/mainnet/"
      and restart the nodes gracefully.

      2. Register the snapshot repository:
          curl -XPOST -u user:password \
          -H "Content-Type: application/json" \
          --url "http://localhost:9200/_snapshot/wecan_hyperion_mainnet" \
          -d '{ "type": "url", "settings": { "url": "https://backup.wecan.dev/wax/hyperion/mainnet/" } }'

      3. Verify snapshots in the repository:
          curl -XGET -u user:password \
          -H "Content-Type: application/json" \
          --url "http://localhost:9200/_snapshot/wecan_hyperion_mainnet/_all"

      4. Restore latest successful snapshot:
          curl -XPOST -u user:password \
          -H "Content-Type: application/json" \
          --url "http://localhost:9200/_snapshot/wecan_hyperion_mainnet/weekly-hyperion-mainnet-2022.06.26-c6cnnuywsmqrqj9gdpsokg/_restore" \
          -d '{ "indices": "*,-.*" }'