Leadvesta

Restore guide

Restore a backup yourself

Download the dump from the app page. It is one restore file (a custom-format pg_dump), created with --format=custom --no-owner --no-privileges by PostgreSQL 18. Restore it with pg_restore 18. An older pg_restore cannot read this file. Leadvesta does not restore it into your database. Point the commands at an empty database you control, and confirm the host before you run them.

1. Put the password in the environment

Do not pass the password on the command line. It would show up in the process list and in shell history.

export PGPASSWORD='the-database-password'
export PGHOST='db.example.supabase.co'
export PGPORT='5432'
export PGUSER='postgres'

2. Restore into an empty database

pg_restore --version
pg_restore --no-owner --no-privileges --dbname 'the_empty_database' ./harbor.dump

pg_restore --version should print PostgreSQL 18. The app page shows the same three commands with your file's real name.

--no-owner and --no-privileges match the flags used to create the dump, so the restore does not try to recreate Supabase roles. Use a database name that is not your live project until you have checked the data.

3. Check a table

psql --dbname 'the_empty_database' --command 'select count(*) from public.your_table;'

Supabase also has auth, storage, and extension objects. A full restore into a brand-new Supabase project can collide with objects that project already created. Restore into a throwaway database first, copy the tables you need, and only then decide what to load into production.

Unset PGPASSWORD when you are done.