CREATE, BACKUP, RESTORE, INSERT FILE SQL POSTGRESQL ::CMD MODE:: [DRAFT]

Sebagai catatan…hal sepele yang sering terlupakan…biar ga kelupaan ane catat disini aja…

MASUK PostgreSQL\9.1\bin>

:: CREATE DATABASE ::

#create database nama_database owner=admin encoding=’sqlascii’ template=template0;

:: BACKUP DATABASE ::

#pg_dump -h ip_host -U user_owner -f path_file nama_database;

:: RESTORE DATABASE ::

keluar dulu : \q

> psql -U user_owner -h ip_host -p port -f path_file nama_database

:: INSERT FILE SQL ::

#\i ‘path_file_sql’;

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s