Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgresql pg_dump

pg_dump -U user -d db_name -h 127.0.0.1 > dump.sql 
Comment

postgres make sql dump

pg_dump -U username dbname > dbexport.pgsql
Comment

postgres dump

----------- DOCKER ----------
## Dump
docker exec -i pg_container_name /bin/bash -c "PGPASSWORD=pg_password psql --username pg_username database_name" > /desired/path/on/your/machine/dump.sql

## Restore
docker exec -i pg_container_name /bin/bash -c "PGPASSWORD=pg_password psql --username pg_username database_name" < /path/on/your/machine/dump.sql
Comment

how to take database dump in postgresql

pg_dump dbname > outfile
Comment

PREVIOUS NEXT
Code Example
Sql :: sql server drop table if exists 
Sql :: sql insert query 
Sql :: how to find the most occuring in SQL 
Sql :: inner join php my admin 
Sql :: postgresql substring last 
Sql :: mysql shell ERROR: Not connected. 
Sql :: go install mysql 
Sql :: what is initial catalog in sql connection string 
Sql :: sql server delete top 1000 
Sql :: mysql change primary key 
Sql :: return insert results in POSTGRESQL 
Sql :: create mysql user on all hosts 
Sql :: create table sql 
Sql :: HOW TO FIND MEDIAN IN SQL FOR BOTH IDD AND EVEN 
Sql :: script to add datafile to tablespace 
Sql :: mysql data types 
Sql :: mysql convert column to uppercase 
Sql :: sql rename column 
Sql :: not operator in oracle 
Sql :: how to alter length character varying postgres 
Sql :: mysql check auto increment value 
Sql :: zsh: command not found: mysql mamp 
Sql :: how to use a database to see tables mysql 
Sql :: postgresql update between 2 tables 
Sql :: sql missing values 
Sql :: postgres change column type to uuid 
Sql :: postgres type cast to string 
Sql :: random name function in mysql for nvarchar 
Sql :: mysql regex replace 
Sql :: how to get nearest location in mysql with latitude and longitude 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =