pg_dump without/forgot password

本文介绍了在忘记QlikSense仓库密码的情况下,如何通过修改pg_hba.conf文件添加白名单,允许无密码备份。步骤包括找到pg_hba.conf文件,将连接方法从md5更改为trust,使用pg_dump工具进行数据库备份,并提醒在完成后恢复安全设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Background

I shared the "Qlik Sense Repository Back up and Restore" in the past , but somehow we don't know or forgor our repository password , and you don't know how to backup it . No worries , you can follow my step to add whitelist in pg_hba_conf to allow you backcup by pg_dump with any password .(154条消息) Qlik Sense Repository Back up and Restore_Moshow郑锴的博客-CSDN博客

 

Solution

first at all , we need to sort out some questions:

1.how to set whitelist ?

by setting the pgsql pg_hba.conf , in database level

2.where the pg_hba.conf in qlik sense ?

path is (TBC)

3.how to add trust connections in pg_hba.conf?

default the method should be md5 , change it from md5 to trust , which means you don't need to input the password in server local any more , but be care and remember to revert it back once done . also remember it only taken effect when you call the command or connect to repository database by the IP you confured in pg_hba.conf

# IPv4 local connections: host    all             all             127.0.0.1/32            trust

4.How to use pg_dump to backup repository/pgsql?

you can refer to offical document to study how it works . 

pg_dump (postgres.com)icon-default.png?t=N4P3http://www.postgres.com/docs/12/app-pgdump.html

If your deployment includes a local database on the central node that was installed using the Qlik Sense setup program, the location will be:
%ProgramFiles%\Qlik\Sense\Repository\PostgreSQL\<database version>\bin.
Note:If you installed PostgreSQL manually, the location will be:
%ProgramFiles%\PostgreSQL\<database version>\bin.

Run the following command:
pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QSR_backup.tar" QSR
 

Easter egg

happy children's day . hop you can keep the childlike enthusiasm/simplicity/delight ~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值