Pages

Friday 25 September 2015

How To Get Backup of Postgresql Database Using Ubuntu Terminal

Hear we are going to delivery the way to backup of the database using the terminal.

First we need to access the remote server from our local system terminal.

We have to require the SSH (secure shell) protocol for accessing the remote server from terminal.

ACCESS USING CUI (character user Interface) VIEW INTERECTION.

SSH (SECURE SHELL) ACCESS :

   >>  ssh remote_user_name @ your_ip_address  -p  your_port_number

For Example:

    >>  ssh root@192.168.0.1 -p 25   

SSH:

SSH is essential tool for the administrator or as master of the system user for access the remote server.

SSH is a protocol used to securely logged onto remote systems.It is the most common way to access remote Linux and Unix-like servers,
such as VPS instances.

SSH is provide the way of  connection from the client to the remote server.

p:

p is indicate that the  port for your server system 

To Get a backup of database we need to execute the below command :

syntax :
    >> pg_dump --cluster 9.1/main --format=c old_database_name >  new_database_name

old_database_name : it's live database name
new_database_name : it's database backup file name

For Example:

    >> pg_dump --cluster 9.1/main --format=c live_db > backup_live_db

No comments:

Post a Comment