Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgresql restore from dump

psql -U postgres -h localhost -p 5432 -f data_dump.sql
Comment

restore postgres database from dump

psql -U username -d dbname < filename.sql
Comment

postgresql dump and restore db

#To dump a database called mydb into a SQL-script file:
pg_dump mydb > db.sql

#To reload such a script into a (freshly created) database named newdb:
psql -d newdb -f db.sql
Comment

restore postgresql database from dump file

pg_restore -U sam -d SamDataBase -1 SamDataBaseBackup.sql
Comment

PREVIOUS NEXT
Code Example
Sql :: HOW TO FIND MEDIAN IN SQL FOR BOTH IDD AND EVEN 
Sql :: sql server reseed identity column 
Sql :: oracle asynchronous query 
Sql :: add new column not null sql server 
Sql :: oracle tablespace datafile max size 
Sql :: turn off safe mode mysql 
Sql :: postgres list all roles 
Sql :: mysql Like(searching in the string) 
Sql :: if not exists insert sql 
Sql :: backup postgres database 
Sql :: sql show tables 
Sql :: update all rows mysql 
Sql :: ora-02391 
Sql :: how to export table data from mysql table in sql format 
Sql :: how to alter table column name in mysql 
Sql :: select amount weeks between two dates mysql 
Sql :: how to add unique key constraint in mysql 
Sql :: sql decimal to 2 places 
Sql :: oracle auto_increment 
Sql :: mysql select and count left join 
Sql :: shrink database file in sql server 
Sql :: how to add CHECK constraint to a column in postgres 
Sql :: restore postgres database from dump 
Sql :: postgres default user 
Sql :: postgresql cast 
Sql :: find a column in all tables mysql 
Sql :: check if string is a number sql 
Sql :: oracle insert or update 
Sql :: use concat in group_concat 
Sql :: declare variables sql 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =