1.

How to take the backup of PostgreSQL?

Answer»

Here are the steps to back up a SINGLE database in PostgreSQL. We shall be using the pg_dump tool as it dumps out the content of all the objects in the database to a single file.

Step 1: First of all, navigate to the PostgreSQL BIN FOLDER:

C:\>cd C:\Program Files\PostgreSQL\9.2\bin

Step 2: Now, we shall execute the pg_dump program and use the following method to back up the EXAMPLES database to the example.tar file to the c:\pgbackup\ folder.

pg_dump -U postgres -W -F t examples > c:\pgbackup\examples.tar

Step 3: Here is your backed up database

c:\pgbackup\dvdrental.tar



Discussion

No Comment Found