參考
http://wiki.developer.mindtouch.com/...your_Deki_Wiki
一、Dekiwiki 备份
在进行备份操作的时候,一定要先将服务器中的mysql、apache、dekiwiki 服务停止
1、停止mysql、apache、dekiwiki 等服务
# service httpd stop
# service mysqld stop
# /etc/init.d/dekiwiki stop
2、备份 wiki 的数据库
# mysqldump -u root -p wikidb > wikidb.sql
3、备份 attachments 文件夹
# cd /var/www/dekiwiki
# tar cvzpf attachments.tar.gz attachments
參考
http://developer.mindtouch.com/Deki_..._Wiki_(non-VM)
attachments 檔目錄應為cd /var/www/deki-hayes/ 目錄 ?
4、copy 下列配置文件到自己指定路径进行备份
- /var/www/dekiwiki/LocalSettings.php
- /var/www/dekiwiki/AdminSettings.php (此文件随版本的不同所以路径也不通,请使用find命令查找文件正确路径后再进行备份)
- /etc/dekiwiki/mindtouch.deki.startup.xml
二、Dekiwiki 还原
首先将备份好的数据库以及attachments 文件夹用FTP、SCP的方式上传到新的deikiwiki中再进行还原
1、停止apache、dekiwiki 等服务
# service httpd stop
# /etc/init.d/dekiwiki stop
2、还原 wiki 的数据库
# mysql -u root -p wiki_db < wikidb.sql
3、还原attachments 文件夹
# cd /home/thx (假设将备份下来的attachments.tar.gz文件夹用FTP上传后的路劲在此处)
# cp attachments.tar.gz /var/www/dekiwiki/
# cd /var/www/dekiwiki
# rm -rf attachments (首先将新的dekiwiki中的attachments 文件夹删除)
# tar zxvfp attachments.tar.gz
自動備份的腳本 - archive.sh
使用前依照系統環境自行修改以下參數
keeps - 保留最近的檔案數量
DBUSR - DB 連線帳號
DBPASS - DB 連線密碼
設定為自動排程執行
#crontab -e
00 01 * * 6 /root/bin/archive.sh
reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)Callstack:
at 實驗專案/企業導入Open_Sources實務/以Deki_Wiki導入企業入口網站架構/Deki_Wiki/Maintain/Dekiwiki_備份和還原
MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException: reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown.
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptVar expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptVar.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Evaluate (MindTouch.Deki.Script.Expr.DekiScriptAccess expr, DekiScriptExpressionEvaluationState state, Boolean evaluateProperties) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptAccess expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptAccess.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptCall expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptCall.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptSequence expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptSequence.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptReturnScope expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0