InterviewSolution
Saved Bookmarks
| 1. |
How will you take backup of the database in PostgreSQL? |
|
Answer» We can ACHIEVE this by using the pg_dump tool for DUMPING all object CONTENTS in the database into a single file. The steps are as follows: Step 1: Navigate to the bin folder of the PostgreSQL installation path. C:\>cd C:\Program Files\PostgreSQL\10.0\binStep 2: EXECUTE pg_dump program to TAKE the dump of data to a .tar folder as shown below: pg_dump -U postgres -W -F t sample_data > C:\Users\admin\pgbackup\sample_data.tarThe database dump will be stored in the sample_data.tar file on the location specified. |
|