User Tools

Site Tools


docu:csheet:sysadm:db:psql:dumping

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
docu:csheet:sysadm:db:psql:dumping [2021/06/08 13:45]
admin
docu:csheet:sysadm:db:psql:dumping [2021/06/08 13:46] (current)
admin
Line 15: Line 15:
 Restoring comands Restoring comands
 <code bash> <code bash>
-#create user if needed (with password)+# create user if needed (with password)
 createuser -P username createuser -P username
  
 +# drop and create the database
 dropdb DATABASE dropdb DATABASE
 createdb DATABASE createdb DATABASE
 +
 +# restore it from .sql dump file
 psql --set ON_ERROR_STOP=on DATABASE < INFILE.sql psql --set ON_ERROR_STOP=on DATABASE < INFILE.sql
 </code> </code>
docu/csheet/sysadm/db/psql/dumping.1623159946.txt.gz · Last modified: 2021/06/08 13:45 by admin