How To Dump In Addition To Restore A Postgresql Database

To practise a postgresql dump inwards linux, execute the next commands:

  1. Login equally beginning user
  2. >su - postgres
  3. >pg_dump -U username -W -Z ix -f /tmp/dump_username.dump.zip -h 127.0.0.1 dbname
  4. >password
To restore, execute:
  1. >psql -U username -f dump_username.dump dbname
Other ways:
>pg_dump -U <username> -W -Z ix -f /outfile.dump.zip -h 127.0.0.1 <dbname> ><password>  //to restore >psql -U <username> -f <infile> <dbname> 

Related Post:

Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
[-(
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
(c)
cheer