This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
docu:csheet:sysadm:db:psql:dumping [2020/02/21 16:12] admin |
docu:csheet:sysadm:db:psql:dumping [2021/06/08 13:45] admin |
||
---|---|---|---|
Line 15: | Line 15: | ||
Restoring comands | Restoring comands | ||
<code bash> | <code bash> | ||
+ | #create user if needed (with password) | ||
+ | createuser -P username | ||
+ | |||
+ | dropdb DATABASE | ||
+ | createdb DATABASE | ||
psql --set ON_ERROR_STOP=on DATABASE < INFILE.sql | psql --set ON_ERROR_STOP=on DATABASE < INFILE.sql | ||
</ | </ |