Skip to content

Commit

Permalink
add information about using the backup
Browse files Browse the repository at this point in the history
  • Loading branch information
moodysalem committed Apr 26, 2024
1 parent 0a1a32f commit bf0b0fa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,19 @@ Service for indexing Ekubo events into a Postgres database.

The indexer focuses on producing an always-consistent realtime view of Ekubo events, using the Apibara service to get a stream of relevant data.

Events are not transformed by the indexer, simply cataloged for later use such as in materialized views or complex analytical queries.
Events are not transformed by the indexer, simply cataloged for later use such as in materialized views or complex analytical queries.

## Syncing a new node

It can take weeks to sync a new mainnet node, so it's recommended to start by using
the [`pg_restore`](https://www.postgresql.org/docs/current/app-pgrestore.html) utility with
the [latest backup](https://github.com/EkuboProtocol/indexer/actions/workflows/backup.yml) of our production database.

The backup is in the directory format, and can be imported more quickly in parallel using the `--jobs` parameter
of `pg_restore`. To utilize the backup:

- Download the `Backup.zip` artifact from the latest workflow run
- Extract the directory
- `pg_restore --dbname=mainnet ~/Downloads/Backup --jobs=16`

After restoring from the backup, you can start the indexer and it should begin at the last block that was synced before the backup started.

0 comments on commit bf0b0fa

Please sign in to comment.