From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | "sivapostgres(at)yahoo(dot)com" <sivapostgres(at)yahoo(dot)com>, Pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: To take backup of Postgresql Database without large objects |
Date: | 2025-04-12 06:00:37 |
Message-ID: | f56c7492-5851-41fc-89fd-94e099f6ed16@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 4/11/25 22:06, sivapostgres(at)yahoo(dot)com wrote:
> Either my command should be wrong or I'm missing something.
This was explained in my post as quoted below.
>
> Happiness Always
> BKR Sivaprakash
>
> On Friday 11 April, 2025 at 08:31:31 pm IST, Adrian Klaver
> <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>
>
> On 4/11/25 05:55, sivapostgres(at)yahoo(dot)com <mailto:sivapostgres(at)yahoo(dot)com>
> wrote:
> > Hello,
> >
> > Using PostgreSQL 15.1, compiled by Visual C++ build 1914, 64-bit in
> > Windows 10.
> >
> > Trying to take backup of a database, using pg_dump, where one table
> > contains bytea datatype, which I don't want to include in the backup.
> >
> > My command was:
> > "E:\DBBackup\bin\pg_dump.exe" -h 192.168.1.1 -p 5432 -U <username>
> > --no-blobs -F c -v -f "E:\DBBackup\demo6_110420251637.bak" demo6
> >
> > the backup includes the bytea field also.
> >
> > I tried with
> > "E:\DBBackup\bin\pg_dump.exe" -h 192.168.1.1 -p 5432 -U <username> -B
> > -F c -v -f "E:\DBBackup\demo6_110420251637.bak" demo6
> >
> > also, which also included the bytea field.
>
> 1) Short version
>
> Short version bytea fields != large objects.
>
> 2) Long version
>
> From here:
>
> https://www.postgresql.org/docs/current/app-pgdump.html
> <https://www.postgresql.org/docs/current/app-pgdump.html>
>
> -B
> --no-large-objects
> --no-blobs (deprecated)
>
> Exclude large objects in the dump.
>
> When both -b and -B are given, the behavior is to output large
> objects, when data is being dumped, see the -b documentation.
>
> Where large objects are defined here:
>
> https://www.postgresql.org/docs/current/largeobjects.html
> <https://www.postgresql.org/docs/current/largeobjects.html>
>
>
>
>
>
> >
> > What wrong I'm doing? Couldn't figure it out. Any help is appreciated.
> >
> > Happiness Always
> > BKR Sivaprakash
>
> >
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2025-04-12 06:05:49 | Re: To take backup of Postgresql Database without large objects |
Previous Message | Christophe Pettus | 2025-04-12 05:37:19 | Re: To take backup of Postgresql Database without large objects |