How to restore PostgreSQL database dump

They'res a magnitude of methods to restore PostgreSQL dumps for a typical plaintext dump "psql" can do a pretty neat Job

In few words a PostgreSQL plaintext dump is nothing but a corpus embodied with SQL statements, which when executed tables are created data gets retrieved, inserted and restored.

So assuming you have a backup dump saved somewhere on your system open your terminal.

And type;

psql -U {{username}} < {{dump.sql}}

That's it you've imported a database dump

Comments

Popular posts from this blog

Tar basic commands to store and extract files

Removing bash.sh #hash comments from a string using regEx in JavaScript

FlappingBird Postmortem (JS13K)

How to build a twitter retweet bot using JavaScript

Npm how to install webpack nodejs