pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
AW: Encryption in pg_dump
3+ messages / 1 participants
[nested] [flat]

* AW: Encryption in pg_dump
@ 2020-07-23 06:32 ` Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>
  2020-07-23 07:04   ` AW: Encryption in pg_dump Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>
  1 sibling, 1 reply; 3+ messages in thread

From: Dischner, Anton @ 2020-07-23 06:32 UTC (permalink / raw)
  To: pgsql-admin

Hi,

i had to do this on the fly compression 30 years ago in Oracle.
You had to use a pipe construct to do this.
Oracle was not able to do this as it is concept in Unix/Linux.

I am looking for an on the fly compression for a year now for PG 
I didnt't dig very deep as i spent most of the time with MySQL/MariaDB.

So i guess this is really a FAQ.

If you have a solution please share,

best,

Anton


-----Ursprüngliche Nachricht-----
Von: Bruce Momjian <bruce@momjian.us> 
Gesendet: Mittwoch, 22. Juli 2020 20:56
An: Paul Förster <paul.foerster@gmail.com>
Cc: vinod kale <vinod16895@gmail.com>; pgsql-admin@postgresql.org
Betreff: Re: Encryption in pg_dump

On Mon, Jul 20, 2020 at 03:24:16PM +0200, Paul Förster wrote:
> Hi Vinod,
> 
> > On 20. Jul, 2020, at 14:40, vinod kale <vinod16895@gmail.com> wrote:
> > 
> > Hello Team,
> > 
> > I am using postgresql 10.8 version in our prod environment. We take dump backup on daily basis of full database. And this dump backup creates in human readable format. 
> > My requirement is backup should creates in encrypted format at the time of pg_dump running. 
> > Is there any way or any option available in pg_dump that will creates the backup in encrypted format or any tool available for same.
> 
> sorry, no way. The only way you have is to pipe the output of pg_dump through some encryption tool. pg_dump does not offer to create encrypted dumps directly using some command line option.

Does anyone know why we are getting so many requests for encrypting dumps all of a sudden?

	July 20  CAD7GeHRZ3tu8y9VG_0juVK3RQq6r+t6HciguEz_C8Eh85Hmq3A@mail.gmail.com
	July 10  CALLD-SGTbu0HCW8NGVg+ycC8PKn9opcbN7aw4CvLj3OVC-hw=Q@mail.gmail.com
	July  8  CAFiui6G0sgLoURsK61vmiPR1Amd7PQt82cvgdmZ7+ukdsbV1QQ@mail.gmail.com

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee








^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* AW: Encryption in pg_dump
  2020-07-23 06:32 ` AW: Encryption in pg_dump Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>
@ 2020-07-23 07:04   ` Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Dischner, Anton @ 2020-07-23 07:04 UTC (permalink / raw)
  To: pgsql-admin

Hi Olivier,

thanks for your hint which is better than my approach.

I did somthing like:

/usr/bin/pg_dumpall --username=postgres | bzip2 > /var/lib/postgresql/backup/"`date +%d-%m-%Y_%H:%M:%S`-"backup_all.sql.bz2

To use encryption: [DRAFT]

tar -czf - ttt | openssl enc -e -aes-256-cbc -pass pass:test -out ttt.tgz
openssl enc -d -aes-256-cbc -pass pass:test -in ttt.tgz | tar xz

As mentioned obove it makes no sense to store the PW in the script.

On the fly encryption would be very nice,

best,

Anton


Von: Olivier Gautherot <ogautherot@gautherot.net>
Gesendet: Donnerstag, 23. Juli 2020 08:50
An: Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Betreff: Re: Encryption in pg_dump

Hi Anton,
Le jeu. 23 juil. 2020 à 08:32, Dischner, Anton <Anton.Dischner@med.uni-muenchen.de<mailto:Anton.Dischner@med.uni-muenchen.de>> a écrit :
Hi,

i had to do this on the fly compression 30 years ago in Oracle.
You had to use a pipe construct to do this.
Oracle was not able to do this as it is concept in Unix/Linux.

I am looking for an on the fly compression for a year now for PG
I didnt't dig very deep as i spent most of the time with MySQL/MariaDB.

Do you mean for dumps? Pg_dump supports it natively with gzip, see option -Z. You can always recompress later (that's what I did for a project at my last job).

So i guess this is really a FAQ.

If you have a solution please share,

best,

Anton


-----Ursprüngliche Nachricht-----
Von: Bruce Momjian <bruce@momjian.us<mailto:bruce@momjian.us>>
Gesendet: Mittwoch, 22. Juli 2020 20:56
An: Paul Förster <paul.foerster@gmail.com<mailto:paul.foerster@gmail.com>>
Cc: vinod kale <vinod16895@gmail.com<mailto:vinod16895@gmail.com>>; pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>
Betreff: Re: Encryption in pg_dump

On Mon, Jul 20, 2020 at 03:24:16PM +0200, Paul Förster wrote:
> Hi Vinod,
>
> > On 20. Jul, 2020, at 14:40, vinod kale <vinod16895@gmail.com<mailto:vinod16895@gmail.com>> wrote:
> >
> > Hello Team,
> >
> > I am using postgresql 10.8 version in our prod environment. We take dump backup on daily basis of full database. And this dump backup creates in human readable format.
> > My requirement is backup should creates in encrypted format at the time of pg_dump running.
> > Is there any way or any option available in pg_dump that will creates the backup in encrypted format or any tool available for same.
>
> sorry, no way. The only way you have is to pipe the output of pg_dump through some encryption tool. pg_dump does not offer to create encrypted dumps directly using some command line option.

Does anyone know why we are getting so many requests for encrypting dumps all of a sudden?

        July 20  CAD7GeHRZ3tu8y9VG_0juVK3RQq6r+t6HciguEz_C8Eh85Hmq3A@mail.gmail.com<mailto:CAD7GeHRZ3tu8y9VG_0juVK3RQq6r%2Bt6HciguEz_C8Eh85Hmq3A@mail.gmail.com>
        July 10  CALLD-SGTbu0HCW8NGVg+ycC8PKn9opcbN7aw4CvLj3OVC-hw=Q@mail.gmail.com<mailto:Q@mail.gmail.com>
        July  8  CAFiui6G0sgLoURsK61vmiPR1Amd7PQt82cvgdmZ7+ukdsbV1QQ@mail.gmail.com<mailto:CAFiui6G0sgLoURsK61vmiPR1Amd7PQt82cvgdmZ7%2BukdsbV1QQ@mail.gmail.com>

--
  Bruce Momjian  <bruce@momjian.us<mailto:bruce@momjian.us>>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* AW: Encryption in pg_dump
@ 2020-07-24 08:44 ` Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>
  1 sibling, 0 replies; 3+ messages in thread

From: Dischner, Anton @ 2020-07-24 08:44 UTC (permalink / raw)
  To: pgsql-admin

Hi, Vinod,

so did you find a solution?

If yes, please share,

best,

Anton

Von: vinod kale <vinod16895@gmail.com>
Gesendet: Donnerstag, 23. Juli 2020 07:30
An: Paul Förster <paul.foerster@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>; pgsql-admin@postgresql.org
Betreff: Re: Encryption in pg_dump

Actually our requirement is neither any of the data in readable format on server. I searched too regarding this. Also i didnt find any option for encryption while pg_dump.
I agree with you Paul. But i just need to confirm with community, so i raised.
And in past few days i googled so many on other issues and finally i get the answer from community only.
So... Thanks for your valuable time.

--
Thanks and Regards
Vinod Kale



On Thu, 23 Jul 2020, 10:40 Paul Förster, <paul.foerster@gmail.com<mailto:paul.foerster@gmail.com>> wrote:
Hi Bruce,

> On 22. Jul, 2020, at 20:55, Bruce Momjian <bruce@momjian.us<mailto:bruce@momjian.us>> wrote:
>
> Does anyone know why we are getting so many requests for encrypting
> dumps all of a sudden?

probably because a) people don't read past posts and b) more and more IT heads decide that *everything*, be it internal to the company or not, has to be encrypted.

Cheers,
Paul


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-07-24 08:44 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 06:32 ` Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>
2020-07-23 07:04   ` Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>
2020-07-24 08:44 ` Dischner, Anton <Anton.Dischner@med.uni-muenchen.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox