restore dump backup database in postgresql
pg_restore -U postgres -d coffee -1 /home/user_name/Downloads/db_backup_name.dump
or
pg_dump DB_name > /home/user/Desktop/db_backup_name.dump
restore ZIP backup database in postgresql
curl -X POST -F 'master_pwd=1234' -F 'name=DB_name' -F 'backup_format=zip' -o /home/user/Desktop/back_up.zip http://localhost:8069/web/database/backup
Create new database
CREATE DATABASE DB_name;
Connect one database
psql db_name user_name
Delete database
DROP DATABASE DB_name
Rename database
ALTER DATABASE DB_name RENAME TO DB_new_name
Copy database
CREATE DATABASE New_DB_name
WITH TEMPLATE Existed_DB_name;
No comments:
Post a Comment