We help IT Professionals succeed at work.

How to backup in postgresql

Tamilarasu P
Tamilarasu P asked
on
293 Views
Last Modified: 2017-04-18
Hi,

   how to take PostgreSQL backup in local driver and restore also.please tell me easiest way of backup & restore.
Comment
Watch Question

IT Consultant
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
out file means backup file name?.if i enter any file name without extension and quotes ?
Dan CraciunIT Consultant
CERTIFIED EXPERT

Commented:
Yes, outfile is the backup file name.

In Windows is something like D:\backups\dailybackup20170331.sql
In Linux is something like /home/backups/dailybackup20170331.sql

Author

Commented:
If I run this command "pg_dump Test > TodayBAckup"  in my postgresql
 I got a this error message "'NoneType' object has no attribute 'connection'"
Dan CraciunIT Consultant
CERTIFIED EXPERT

Commented:
Do you have a database called Test?
That error basically says it could not find (or could not access due to insufficient rights) a database called "Test".

Author

Commented:
my database name was test
Dan CraciunIT Consultant
CERTIFIED EXPERT

Commented:
test or Test?