Skip to content

gitcoinco/indexer-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grants Indexer Data

Getting started

What you will need:

  • PostgreSQL server
  • Docker (optional if you already have a pg instance)
  • Database dump file (backup.dump)
  • PostgreSQL client tools (psql, pg_restore)

Optional: Create new postgres instance using docker

docker run --name postgres-db \
  -e POSTGRES_PASSWORD=your_password \
  -e POSTGRES_USER=your_username \
  -e POSTGRES_DB=indexer \
  -p 5432:5432 \
  -d postgres:latest

Create Role

psql -h your_host -U your_username -d indexer -c "CREATE ROLE grantexplorer;"

Restore data dump using pg_restore

pg_restore \
  --host=your_host \
  --username=your_username \
  --dbname=indexer \
  --no-owner \
  --no-acl \
  --verbose \
  --clean \
  --no-privileges \
  backup.dump

PS: Might get a warning like pg_restore: warning: errors ignored on restore: 106. You can ignore it.

Verify restoration

Check if tables exist

psql -h your_host -U your_username -d indexer -c "\dt"

Connect to database for manual inspection

psql -h your_host -U your_username -d indexer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published