Postgres Database Backup

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Post Reply
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Postgres Database Backup

Post by sandeep_c24 »

How can I use Zeos to backup Postgres database?

Regards

Sandeep
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

I think you'd be better off using the pg_dump and pg_dumpall included in the Postgresql distro. They are made for the purpose.

Regards,

Ben
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Post by sandeep_c24 »

The thing with pgdump is I cannot use it from application without storing password in pgpass file. I don't want to do this. Is there any other way of backing up postgres database from the application?

Regards

Sandeep
varathasiva
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 28.05.2007, 14:31

Post by varathasiva »

no need to put the password in pgpass file.just u want set pasword thru command
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

It doesn't look as if there is an option to call pg_dump with a password without using the .pgpass file. I think it's for security reasons.

You could hack pg_dump to take a password on the command line. I'm not sure how much work it would be but you do have the code available.

Regards,

Ben
varathasiva
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 28.05.2007, 14:31

Post by varathasiva »

set PGPASSWORD=my_password u can use this command before run pg_dump command
Post Reply