how to decompress .sql extension file in windows server

245 Views Asked by At

I have taken full backup of postgresql database which consists of 100 databases. The backup format is .sql (eg pg_dumpall.exe -U postgres > D:\Backup\fullbkp.sql) now one of my database got crashed and I want to extract this file to get that database backup only for restoration. I have searched a lot but couldn't find any way to decompress so that I can get that particular database from full backup file. Please suggest !!!! Regards Sadam

1

There are 1 best solutions below

6
Laurenz Albe On

Such a backup is not compressed. Also, it contains a backup of all databases in th cluster, and there is no easy way to extract a single database.

Create a new PostgreSQL cluster with initdb, restore the dump there using psql, then use pg_dump to extract the single database you need.