---
title: "Discussion on \"Postgres database restore via dumps\" | Hashnode"
description: "Discussion on \"Postgres database restore via dumps\". Create the database dump (you'll be prompted for the password)\npg_dump -U<DB_USER> -h<DB_HOST> <DB_NAME> > dumpfile\nCopy over the dump file to the new machine that has postgresql installed\nRecreate the DB or drop individual tables\nApply the dump\npsql..."
url: "https://hashnode.com/posts/postgres-database-restore-via-dumps/65388ebcc8bd76faad8340fe"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Postgres database restore via dumps](https://blog.danwald.me/postgres-database-restore-via-dumps?utm_source=hashnode&utm_medium=feed)

Create the database dump (you'll be prompted for the password) pg\_dump -U<DB\_USER> -h<DB\_HOST> <DB\_NAME> > dumpfile Copy over the dump file to the new machine that has postgresql installed Recreate the DB or drop individual tables Apply the dump psql...

Oct 25, 2023 · 1 min read · blog.danwald.me  
Read the article

-   [#migration](https://hashnode.com/tag/migration)
-   [#database](https://hashnode.com/tag/database)
-   [#postg](https://hashnode.com/tag/postg)

## Written by

[Danny Crasto](https://hashnode.com/@danwald)

@danwald · dubai, uae

  
[View profile](https://hashnode.com/@danwald)

backend/cloud engineer | mentor | pythonista

I am developer/code-reviewer/debugger/bug-fixer/architect/teacher/builder from dubai, uae

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
