Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Import SQL dump into PostgreSQL database

Here is the command you are looking for.

psql -h hostname -d databasename -U username -f file.sql

psql databasename < data_base_dump

That's the command you are looking for.

Beware: databasename must be created before importing. Have a look at the PostgreSQL Docs Chapter 23. Backup and Restore.

Tags:

Database

Postgresql

Related

Javascript functions, how can I start beginning to understand them? Why use "strlen30()" instead of "strlen()"? How to create temp dir in Ruby? Get top 1 row of each group linux image from clipboard Is there Java HashMap equivalent in PHP? Why Is Subtracting These Two Times (in 1927) Giving A Strange Result? How to set font color for STDOUT and STDERR server error:405 - HTTP verb used to access this page is not allowed Link to iPhone map App from HTML page Getting the base url of the website and globally passing it to twig in Symfony 2 Java/MongoDB query by date

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy