Make a Backup for Movable Type 4

| 16 Comments | No TrackBacks

空间搬迁,少不了备份Movable Type。

MT4的备份可以分为两步,备份模板备份数据。

1. 备份模板

MT的模板和WP不一样,分为Templates和Styles,默认情况下,修改的Templates是不会产生单独的对应文件的,如果想单独备份Template,可以使用每个Template下面都有的"Link to File"功能。

比如说,要保存"Main Index"这个Template,先在blog根目录下(我的是/blog/)建立一个文件夹,可以取名为"templates",于是,在"Link to File"中就可以填入"/templates/main_index.tmpl",这样的话每次保存"Main Index"这个Template之后,就会产生一个单独的文件main_index.tmpl在templates目录下。

其他templates的操作也是这样,当然,备份文件的名字是可以随便取的,只要能分辨出就行。

因此,Templates的备份就是把自己建立的文件夹templates,包括里面的文件,全部传到本地就行了。

而Styles的备份就非常简单了,进入/mt-static/themes/,找到当前使用的style对应的文件夹,传到本地即可。

这样就完成了模板的备份。

2. 备份数据

相对于模板来说,数据的备份就最简单了,进入后台,右上角"System Overview->Tools",选择Backup,选好需要备份的blog,默认设置,按一下"Make Backup",保存好生成的一个xml文件就行了。

这里要说一下的是Import和Export这两个功能,Export导出的只是全部文章和评论,不包括各种设置,而Import导入的也是文章和评论,还支持其他blog平台的文章导入。这两个功能适合不同平台之间文章的传递,而不适于blog的备份。

3. 还原

讲完备份,就应该讲一下还原的时候应该做的,其实还原很简单,只要按原样把备份的东西放回对应的目录就可以了,前提是先在主机上把MT安装好,然后把templates文件夹传回blog根目录,style文件夹放回/mt-static/themes/下面,之后进入"System Overview->Tools",选择"Restore",选择之前的xml文件,等待片刻就行了。最后重新Publish一下就OK了。


升级MT的话,SSH登录主机,下载升级压缩包:
wget http://www.movabletype.com/downloads/blogger/MT-4.2.6-en.tar.gz

解压缩
tar xzvf MT-4.2-en.tar.gz

覆盖原有的MT系统文件。
cd MT-4.2-en
cp -f . ~/your site/mtcgi

然后当登入MT系统时,会提示升级。

来自:http://xch.name/blog/2008/03/make-a-backup-for-movable-type.html

No TrackBacks

TrackBack URL: http://www.xdstu.org/cgi-bin/mt-tb.cgi/52

16 Comments

I'm not sure I agree with everything you've mentioned, but definitely some good points made.

I retain listening to real news speak about getting free on the net grant applications so I have been seeking around for true best web-site to get one.

Hi! I want to say thanks for an interesting entry about a something I have had an interest in for many years now. I have been lurking and reading the entries avidly and just wanted to express my thanks for providing me with some insterestin posts. I anticipate more, and taking a more active role in the conversations on your site.

Hi! I want to say gracias for an interesting site about a something I have had an interest in for many years now. I have been lurking and reading the entries avidly and just wanted to express my thanks for providing me with some insterestin reading material. I look forward to more, and taking a more involved part in the conversations on this site.

Hi, i must say fantastic blog you include, i stumbled across it in Yahoo. Does you get much traffic?

awesome stuff thanx

Hi, i must say fantastic blog you have, i stumbled across it in Google. Does you get much traffic?

Just considered i would comment and also say neat design, did you code it yourself? Looks great.

That’s Too nice, when it comes in india hope it can make a Rocking place for youngster.. hope which arrive true.

As a Newbie, I am often searching on the web for articles that can guide me. Thank you

Thanks for sharing. I was searching for webdesign information when I found this blog. I am always interested in this subject. Do you people know Artisteer? Will bookmark!

Helo there, well I see that your argued subject is rather special as it talks about a good deal of interesting info. In Any Event, was wondering whether you would love to exchange web links with my site, as I am looking forward to generate more links to further expand and increase web exposure for my site. I do not mind you setting my links at the home page, just getting this links on this respective page is more than adequate. Furthermore, would you be kind enough leave a message at my web space if you are keen in swapping links, I would really value that. I would like to thank you and I hope to get a reply from you very soon!

Your blog is informative – with a lot of updated interesting furniture designs.I enjoy your blog layout where'd you but the layout?.

Leave a comment

July 2010

Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Archives

About this Entry

This page contains a single entry by admin published on June 22, 2009 1:33 AM.

忧郁来袭 was the previous entry in this blog.

意念的转折 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.