Harat
Harat

Reputation: 1366

How to take PostgreSQL Database Backup and find the location of Backed up Database in Digital Ocean(Ubuntu)

I have taken a backup of PostgreSQL database using

pg_dump dbname > dbname.bak

now, how do I download it to my local PC?

Upvotes: 3

Views: 681

Answers (1)

Harat
Harat

Reputation: 1366

I foung answer. In Ubuntu, try this

sudo su - postgres
pg_dump db_name > db_name.bak

and find backup in /var/lib/postgresql

Upvotes: 4

Related Questions