Upgrading from a previous version
Erigon Version Upgrade: Latest Features, Data Compatibility, and Downgrade Options
Updating to the latest version of Erigon gives you access to the latest features and ensures optimal performance and stability.
General Recommendations Before Upgrade
Read Release Notes: Carefully review the Release Notes for breaking changes and new features relevant to your setup.
Terminate your Erigon: End your current Erigon session by pressing
CTRL+C.Backup: Always back up your
datadirbefore performing major upgrades.
Managing your Data
Erigon 3.1 introduces a new snapshot format while continuing to support the old one. This means that new releases are fully compatible with your existing data. However, users who want the latest data files and data-specific fixes can perform an optional manual data upgrade:
Backup your datadir.
Upgrade your Erigon installation whether from a binary, compiled source code, or Docker.
To initiate the data upgrade, use the following command:
./build/bin/erigon snapshots reset --datadir /your/datadir.Run Erigon, it will reuse existing data and sync only newer snapshots.
Snapshots Upgrade Options
erigon update-to-new-ver-format --datadir /your/datadir: this option updates snapshots to be compatible with latest version, but you will not get the full benefits of the new snapshots.erigon snapshots reset --datadir /your/datadir: this command removes all old snapshots that have had performance improvements.
Choose upgrade for a quicker process, or reset for maximum performance. If you choose reset, you'll need to wait for the new snapshots to download once Erigon starts.
Snapshots Downgrade Options
If upgrading snapshots(3.0to 3.1) now happens automatically, you should follow these instructions for downgrading:
WARNING: This algorithm will remove incompatible 3.1 snapshot files because they are not backward-compatible.
Make sure that you're running Erigon on 3.1.x version, use
erigon --version.Run
erigon --datadir ../your/datadir reset-to-old-ver-formatto reset your snapshots to old format.git checkout v3.0.xto checkout to preferred3.0version. For example now latest:git checkout v3.0.15Run your old version of Erigon.
Upgrading your Erigon Installation
Follow the below instructions depending on your installation method:
Pre-built Binaries (only Linux and MacOS)
Download the latest binary file from https://github.com/erigontech/erigon/releases, do the checksum and reinstall it, no other operation needed.
Docker
If you're using Docker to run Erigon, the process to upgrade to a newer version of the software is straightforward and revolves around pulling the latest Docker image and then running it.
Simply follow the Docker instructions and install and launch the new version.
Compiled from source
To upgrade Erigon to a newer version when you've originally installed it via Git and manual compilation, follow the installation instructions from step 2 "Check Out the Desired Stable Version (Tag)".
Last updated
Was this helpful?