pg_back icon indicating copy to clipboard operation
pg_back copied to clipboard

Set permission for dump files

Open arnobnq opened this issue 1 year ago • 2 comments

Hi,

I don't see how one can alter the permissions of the dump files produced by pg_back. Changing the value of umask doesn't seem to have an effect, dump files have mod 0600 regardless of the current umask value :

[postgres@pg1 ~]$ umask
0000
[postgres@-pg1 ~]$ pg_back 
2024/10/31 10:09:04 INFO: dumping globals
2024/10/31 10:09:04 INFO: dumping instance configuration
2024/10/31 10:09:04 INFO: dumping database postgres
2024/10/31 10:09:04 INFO: dump of postgres to /var/backups/postgresql/postgres_2024-10-31T10:09:04Z.dump done
2024/10/31 10:09:04 INFO: waiting for postprocessing to complete
2024/10/31 10:09:04 INFO: purging old dumps
[postgres@-pg1 ~]$ ls -l /var/backups/postgresql/postgres_2024-10-31T10:09:04Z.dump
-rw-------. 1 postgres users 1008 Oct 31 10:09 /var/backups/postgresql/postgres_2024-10-31T10:09:04Z.dump

Have I missed something ?

Thanks.

arnobnq avatar Oct 31 '24 10:10 arnobnq

Hi, sorry for the late reply.

This mode value is hard coded, so it's not possible to change it currently. It could be made configurable.

Regards.

orgrim avatar Jan 14 '25 09:01 orgrim

FYI i started to implement this.

l00ptr avatar Jan 24 '25 17:01 l00ptr