【标题描述】:
【测试类型:工具功能】【测试版本:3.0.0】
问题描述
gs_dumpall使用with-encryption和with-key参数,恢复过程解密失败
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
【测试环境】(单机/1主x备x级联备):
单机
【被测功能】:
dumpall解密恢复
【测试类型】:
工具功能
【数据库版本】(查询命令: gaussdb –V):
【预置条件】:
创建测试用户,并授予管理员权限
create user 新用户名 with password "密码";
GRANT ALL PRIVILEGES TO 新用户;
导入tpcc和tpch模型数据
使用gs_dumpall加密导出
【操作步骤】(请填写详细的操作步骤):
gsql -d -p -r -f恢复
【预期输出】:
成功恢复
【实际输出】:
恢复失败,提示解密失败
【原因分析】:
【日志信息】(请附上日志文件、截图、coredump信息):
【测试代码】:
Hey @beTheOneIWannaBe, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Hi @beTheOneIWannaBe, please use the command /sig xxx to add a SIG label to this issue.
For example: /sig sqlengine or /sig storageengine or /sig om or /sig ai and so on.
You can find more SIG labels from Here.
If you have no idea about that, please contact with @xiangxinyong , @zhang_xubo .
1.恢复数据时,加了--with-key=test@KEY 参数吗?方便提供完整的恢复命令与报错日志。
我自测使用下面命令导出:
gs_dumpall -c -f /home/ommms1/backup/dumpdata/all.sql --with-encryption=AES128 --with-key=test@KEY -p 28800
下面命令恢复:
gsql -d postgres -p 28800 -r -f /home/ommms1/backup/dumpdata/all.sql --with-key=test@KEY
可以正常恢复
2.恢复数据时,加了参数-with-key,但是参数值与导出时的参数值不一样,就会报解密失败。可复现报错
gsql -d postgres -p 28800 -r -f /home/ommms1/backup/dumpdata/all.sql --with-key=test@KEYaa
decrypt cipher text to plain text failed.
total time: 3 ms
恢复时带了with_key参数,完整回复命令和你自测的命令是一致的,好像是和数据内容有关系的,我随便建测试库插入一点数据导出的sql恢复是正常的
你还能复现问题吗?什么数据内容可以出现此错误,方便提供下具体测试步骤吗?
登录 后才可以发表评论