414 Star 1.4K Fork 1.6K

GVPopenGauss/openGauss-server

 / 详情

dumpall使用with-encryption和with-key参数,恢复过程解密失败

已取消
缺陷
创建于  
2022-11-07 14:32

【标题描述】:
【测试类型:工具功能】【测试版本: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恢复

【预期输出】:
成功恢复
【实际输出】:
恢复失败,提示解密失败
【原因分析】:

  1. 这个问题的根因
  2. 问题推断过程
  3. 还有哪些原因可能造成类似现象
  4. 该问题是否有临时规避措施
  5. 问题解决方案
  6. 预计修复问题时间

【日志信息】(请附上日志文件、截图、coredump信息):
输入图片说明
【测试代码】:

评论 (5)

Max 创建了缺陷

Hey @Max, 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 @Max, 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 , @zhangxubo .

yansong_lee 负责人设置为周斌
yansong_lee 优先级设置为主要
周斌 添加协作者周斌
周斌 负责人周斌 修改为li_jianqiu
周斌 取消协作者周斌

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恢复是正常的

你还能复现问题吗?什么数据内容可以出现此错误,方便提供下具体测试步骤吗?

Max 任务状态待办的 修改为已取消

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5622128 opengauss bot 1581905080
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server

搜索帮助

Cb406eda 1850385 E526c682 1850385