标签:备份 expand and key 内容 line word exp 数据
属性垃圾的定义为,一个垃圾用户在 Confluence 创建了用户,但是这个用户在自己的属性页面中添加了垃圾 URL。
如果你有很多垃圾用户在你的系统中创建了属性,你可以使用下面的 SQL 很容易的一次性删除。
如何删除属性中的垃圾:
SELECT bodycontentid,body FROM bodycontent WHERE contentid IN ( SELECT contentid FROM content WHERE contenttype= ‘USERINFO‘ ) ORDER BY bodycontentid DESC ; |
bodycontentid >= BOTTOM_OF_SPAM_RANGE AND bodycontentID <= TOP_OF_SPAM_RANGE DELETE FROM bodycontent WHERE bodycontentid IN ( SELECT bodycontentid FROM killset); DELETE FROM links WHERE contentid IN ( SELECT contentid FROM killset); DELETE FROM content WHERE prevver IN ( SELECT contentid FROM killset); DELETE FROM content WHERE pageid IN ( SELECT contentid FROM killset); DELETE FROM content WHERE contentid IN ( SELECT contentid FROM killset); DELETE FROM os_user_group WHERE user_id IN ( SELECT id FROM killset k JOIN os_user o ON o.username=k.username); DELETE FROM os_user WHERE username IN ( SELECT username FROM killset); |
如果你使用的是 Confluence 5.6 或者早期的版本,请使用下面的 SQL 命令:
https://www.cwiki.us/display/CONF6ZH/Preventing+and+Cleaning+Up+Spam
标签:备份 expand and key 内容 line word exp 数据
原文地址:https://www.cnblogs.com/huyuchengus/p/9496537.html