Postgresql BackUp Command

Postgresql BackUp Command

1, In Windows XP, Go to Run , type cmd to open Command Prompt

2, Go to the Bin directory inside the Postgresql Installation directory

For EX : E:\workdir\Postgresql\bin

3, Postgresql has its own utility for BackUp called “pg_dump”.

The most common options used are :

1, -h à localhost (hostname)

2, -p à port (default is 5432)

3, -U à user of the database(default is postgres)

4, -f à output backup file name with location

Syntax : pg_dump [options] [databasename]

Ex: To backup “mydatabase” into a file “archive1.dmp” in location “E:\” ,

Use pg_dump -h localhost -p 5432 -U postgres –f “E:\archive1.dmpmydatabase

0 comments:

Post a Comment

Popular Posts