-- use postgres in command line psql -d postgres -U postgres CREATE DATABASE databasename; -- by the way: to unzip zip use: -- unzip zipName.zip -d folderPath or unzip zipName.zip -- import database form file to database postgres=# \i /home/szalek/data/dataBaseName.tar -- create copy of database postgres=# CREATE DATABASE copy1 WITH TEMPLATE oldDataBase OWNER szalek; -- list of database postgres=# \list -- rename database postgres=# ALTER DATABASE copy1 RENAME TO copy2;
↧
postgres notes
↧