This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
database:postgresql [2016/03/24 16:04] – [Roles and Grants] tmade | database:postgresql [2018/03/31 10:06] (current) – [RESTORE] tmade | ||
---|---|---|---|
Line 94: | Line 94: | ||
psql -f dumpfile postgres | psql -f dumpfile postgres | ||
- | | ||
- | To restore a DB (created with " | ||
- | |||
- | dropdb databasename | ||
- | createdb databasename | ||
- | | ||
- | Afterwards you have to invoke: | ||
- | |||
- | pg_restore -d databasename databasename.dump | ||
- | psql dbname < infile.sql | ||
- | |||
==== POINT IN TIME RECOVERY ==== | ==== POINT IN TIME RECOVERY ==== | ||