当前用户租户:mq_t1
###设置归档目标端
ALTER SYSTEM SET LOG_ARCHIVE_DEST=‘LOCATION=file:///data/nfs/backup/archive’ TENANT = mq_t1;
Query OK, 0 rows affected (0.045 sec)
##设置租户归档模式
obclient [oceanbase]> ALTER SYSTEM ARCHIVELOG TENANT = mq_t1;
Query OK, 0 rows affected (0.012 sec)
##设置备份密码
obclient [oceanbase]> SET ENCRYPTION ON IDENTIFIED BY ‘root123’ ONLY;
Query OK, 0 rows affected (0.003 sec)
##设置备份目的端
obclient [oceanbase]> ALTER SYSTEM SET DATA_BACKUP_DEST= ‘file:///data/nfs/backup/data’ TENANT = mq_t1;
Query OK, 0 rows affected (0.040 sec)
##对当前全部租户进行全备份
obclient [oceanbase]> ALTER SYSTEM BACKUP DATABASE PLUS ARCHIVELOG;
Query OK, 0 rows affected (0.021 sec)
##查看当前时间
obclient [oceanbase]> select now();
±--------------------+
| now() |
±--------------------+
| 2024-01-24 16:31:25 |
±--------------------+
1 row in set (0.003 sec)
##模拟破坏,删除租户
obclient [oceanbase]> drop tenant mq_t1 force;
Query OK, 0 rows affected (0.271 sec)
##创建新资源池
obclient [oceanbase]> alter system set memory_limit = ‘16G’;
Query OK, 0 rows affected (0.028 sec)
obclient [oceanbase]> CREATE RESOURCE POOL mq_pool_03
→ UNIT=‘S1_unit_config’,
→ UNIT_NUM=1,
→ ZONE_LIST=(‘zone1’,‘zone2’);
Query OK, 0 rows affected (0.028 sec)
#设置恢复密码
obclient [oceanbase]> SET DECRYPTION IDENTIFIED BY ‘root123’;
Query OK, 0 rows affected (0.004 sec)
#################恢复报错####
ALTER SYSTEM RESTORE mysql FROM ‘file:///data/nfs/backup/data,file:///data/nfs/backup/archive’ UNTIL TIME=‘2024-01-24 16:31:25’ WITH ‘pool_list=mq_pool_03’ WITH KEY FROM ‘file:///data_backup_dest/key’ ENCRYPTED BY ‘root123’;
ERROR 1210 (HY000): Invalid argument
麻烦各位老师帮忙看看那个地方出的问题,谢谢!!