同事在discuz后台不小心将贴子分类全部删除。
解压今日凌晨的备份
cd /home/backup
tar -xvf discuz.tar
#discuz后台出公告后,关闭discuz
/opt/lemp stopmysql
#备份当前discuz
cd /opt/mysql/var
tar -cvf discuz090316.tar ./discuz
mkdir discuz2
chown mysql:mysql discuz2
mv /home/backup/opt/mysql/var/discuz/* ./discuz2/
/opt/lemp startmysql
#进入phpmyadmin
导出discuz2库的threadtypes结构的数据+droptable,导入discuz库
执行sql
update discuz.cdb_forumfields,discuz2.cdb_forumfields set discuz.cdb_forumfields.threadtypes=discuz2.cdb_forumfields.threadtypes where discuz.cdb_forumfields.fid=discuz2.cdb_forumfields.fid;
update discuz.cdb_threads,discuz2.cdb_threads set discuz.cdb_threads.typeid=discuz2.cdb_threads.typeid where discuz.cdb_threads.tid=discuz2.cdb_threads.tid;
完成
No Responses (yet)
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.