zabbix-backup icon indicating copy to clipboard operation
zabbix-backup copied to clipboard

Do not read neither the system-wide psqlrc file nor the user's ~/.psqlrc file

Open diffway opened this issue 3 years ago • 3 comments

During unknown tables check there is error:

Reading database options from /etc/zabbix/zabbix_server.conf... Configuration: - type: psql - host: 127.0.0.1 (127.0.0.1) - port: 5432 - database: zabbix - user: zabbix - output: /tmp/tmp.tzM4s7yilr Fetching list of existing tables...

ERROR Unknown tables found in database: - Time: - 7.813 - ms To include them (full data backup) specify -f, to ignore them use -i

It happens because I use \timing in ~/.psqlrc to see how long each query takes.

Adding --no-psqlrc solves the issue.

PS: System info: postgres-server-11 on debian-8 (jessie) PPS: Sorry my Markdown skill is poor.

diffway avatar Jul 02 '21 19:07 diffway

maybe you should add an option to enable/disable this behavior, rather than always disabling?

ironbishop avatar Jul 03 '21 08:07 ironbishop

@ironbishop, thanks for comment. IMO backup software should just work, in case of bath mode, it should not rely on local user preferences. I would prefer to leave this PR as-is, if it's possible.

btw, there is duplicate: #25

diffway avatar Jul 22 '21 09:07 diffway

There is, and it's missing the cli option the same way. Can you add it?

ironbishop avatar Jul 22 '21 11:07 ironbishop