matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Subtask]: change sys tenant restore normal tenant to normal tenant syntax

Open YANGGMM opened this issue 1 year ago • 4 comments

Parent Issue

14784

Detail of Subtask

change sys tenant restore normal tenant to normal tenant syntax

  1. remove to account
  2. default according to the snapshot

Describe implementation you've considered

No response

Additional information

No response

YANGGMM avatar May 16 '24 07:05 YANGGMM

之前已经改了

ck89119 avatar May 16 '24 08:05 ck89119

test has passed

YANGGMM avatar May 16 '24 09:05 YANGGMM

testing

Ariznawlll avatar May 16 '24 09:05 Ariznawlll

系统租户恢复普通租户到普通租户: 数据量10w 测试步骤:

连接mo:
mysql -h 127.0.0.1 -P 6001 -udump -p111
create account acc01 admin_name = 'test_account' identified by '111';
acc01连接mo:
mysql -h 127.0.0.1 -P 6001 -uacc01:test_account -p111
create database sysbench_db;

git clone https://github.com/matrixorigin/mo-sysbench.git
cd mo-sysbench
sysbench  --mysql-host=127.0.0.1 --mysql-port=6001 --mysql-user=acc01:test_account --mysql-password=111 oltp_point_select.lua --mysql-db=sysbench_db --tables=10 --table_size=100000 --threads=1000 --time=30 --report-interval=10 cleanup
sysbench  --mysql-host=127.0.0.1 --mysql-port=6001 --mysql-user=acc01:test_account --mysql-password=111 oltp_point_select.lua --mysql-db=sysbench_db --tables=10 --table_size=100000 --threads=1000 --time=30 --report-interval=10 --auto_inc=off prepare

cd mo-backup
./mo_br snapshot restore --host "127.0.0.1" --port 6001 --user "dump" --password "111" --account "acc01" --sname "sp01"

mysql -h 127.0.0.1 -P 6001 -uacc01:test_account -p111
drop table sbtest2;
drop table sbtest5;
truncate sbtest7;
delete from sbtest9 where id > 50000;
image

执行恢复之后,验证数据正确性。

测试结论:系统租户恢复普通租户到普通租户命令 成功,可以正常使用

Ariznawlll avatar May 17 '24 08:05 Ariznawlll