Allen 2022-05-31 21:37:23 28179 0 0 0 0
站点日志,TYCMS管理,Oracle数据泵(expdp,impdb)在oracle不同版本间导入导出问题解决:使用version参数。由低版本导出到高版本时,没问题;高版本导出到低版本时,有问题,需要解决,否则无法导入。引用文章,略有删减,经过测试,先放解决方法和结论...

将部分敏感版块迁移到核心网

--版块
update ty_forum set site_id=124 where forum_id=323;
update ty_forum set site_id=124 where forum_id=388;

--主题
update ty_main set site_id=124 where forum_id=323;
update ty_main set site_id=124 where forum_id=388;

--Log
update ty_log set site_id=124 where main_id in (select main_id from ty_main where forum_id=323);
update ty_log set site_id=124 where main_id in (select main_id from ty_main where forum_id=388);

--act
update ty_act set site_id=124 where main_id in (select main_id from ty_main where forum_id=323);
update ty_act set site_id=124 where main_id in (select main_id from ty_main where forum_id=388);

--tag处理
--将源版块tag,已经存在于目标站的数据,插入临时表
insert into tag_tmp select * from ty_tag where forum_id=323 and tag_name in (select tag_name from ty_tag where site_id=124);
insert into tag_tmp select * from ty_tag where forum_id=388 and tag_name in (select tag_name from ty_tag where site_id=124);
--根据临时表,删除源版块中的tag
delete from ty_tag where forum_id=323 and tag_name in (select tag_name from tag_tmp);
delete from ty_tag where forum_id=388 and tag_name in (select tag_name from tag_tmp);
--更新源版块的tag,站点=新站点
update ty_tag set site_id=124 where forum_id=323;
update ty_tag set site_id=124 where forum_id=388;

--相关文件移动
mv /www/wwwroot/源站点/upload/image/img030/202205/f343* /www/wwwroot/目标站点/upload/image/img030/202205/
mv /www/wwwroot/源站点/upload/image/img030/202205/s111-f343* /www/wwwroot/目标站点/upload/image/img030/202205/

mv /www/wwwroot/源站点/upload/image/img030/202204/f343* /www/wwwroot/目标站点/upload/image/img030/202204/
mv /www/wwwroot/源站点/upload/image/img030/202204/s111-f343* /www/wwwroot/目标站点/upload/image/img030/202204/
(/img030/下文件夹都要执行一遍)

===
目标站原来版块整理,合并到源版块ID
--tag
update ty_tag set forum_id=388 where forum_id=147;
update ty_tag set forum_id=387 where forum_id=355;
update ty_tag set forum_id=390 where forum_id=282;
update ty_tag set forum_id=391 where forum_id=299;
--act
update ty_act set forum_id=388 where main_id in (select main_id from ty_main where forum_id=147);
update ty_act set forum_id=387 where main_id in (select main_id from ty_main where forum_id=355);
update ty_act set forum_id=390 where main_id in (select main_id from ty_main where forum_id=282);
update ty_act set forum_id=391 where main_id in (select main_id from ty_main where forum_id=299);
--log
update ty_log set site_id=124 where main_id in (select main_id from ty_main where forum_id=147);
update ty_log set site_id=124 where main_id in (select main_id from ty_main where forum_id=355);
update ty_log set site_id=124 where main_id in (select main_id from ty_main where forum_id=282);
update ty_log set site_id=124 where main_id in (select main_id from ty_main where forum_id=299);

--main
update ty_main set forum_id=388 where forum_id=147;
update ty_main set forum_id=387 where forum_id=355;
update ty_main set forum_id=390 where forum_id=282;
update ty_main set forum_id=391 where forum_id=299;
--forum
update ty_forum set forum_limit='1' where forum_id=147;
update ty_forum set forum_limit='1' where forum_id=355;
update ty_forum set forum_limit='1' where forum_id=282;
update ty_forum set forum_limit='1' where forum_id=299;

【版權聲明】
本文爲原創,遵循CC 4.0 BY-SA版權協議!轉載時請附上原文鏈接及本聲明。
原文鏈接:https://tdlib.com/am.php?t=WmuWZjcrdGmC
Tag: 站点日志 TYCMS管理
歡迎評論
未登錄,
請先 [ 註冊 ] or [ 登錄 ]
(一分鍾即可完成註冊!)
返回首頁     ·   返回[站点日志]   ·   返回頂部