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: 3.1.0-3.2.0, 3.x.x, 4.x.x

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


Light-API (https://github.com/cc32d9/eosio_light_api) backups for WAX.

MariaDB database backup was taken from MariaDB 11.2.2.

The Chronicle snapshot was taken from Chronicle 3.3

Refer to Chronicle docs for more info https://github.com/EOSChronicleProject/chronicle-tutorial

The database and chronicle shapshot dates are also represented in epoch dates e.g. "wax.snapshot_1704274922" and "lightapi_db.sql.1704183241.dump".

WAX Mainnet Light API MariaDB dumps

WAX Mainnet Light API Chronicle shapshots


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

      In case of issues please refer to this document "wecan_user not found"
      or create a system user "CREATE ROLE wecan_user WITH LOGIN PASSWORD 'your_password';" - this is just renamed generic user, the password is your own; which can speed up things for you - further role reassignment can be done with a procedure call
    

Restore Light-API Chronicle snapshot and DB dump:

      1. mariadb -u root -plightapi lightapi < /var/lib/snapshots/lightapi_db.sql.dump
      2. /usr/local/sbin/chronicle-receiver --config-dir=/var/local/chronicle/chronicle-config --data-dir=/var/local/chronicle/chronicle-data --restore-snapshot=/var/local/chronicle/wax.snapshot
    

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": "*,-.*" }'