version=pmwiki-2.1.beta20 ordered=1 urlencoded=1 agent=Mozilla/5.0 (Windows; U; Windows NT 5.0; ja; rv:1.8) Gecko/20051111 Firefox/1.5 author= ctime=1137216308 host=219.160.65.47 name=PmWikiJa.バックアップとリストア rev=5 targets=PmWikiJa.ドキュメント目次 text=This page has some background information on making backups and explains some basic *nix backup and restore procedures.%0a%0aこのページは、バックアップを作ることについてある背景的情報を持っており、いくつかの基礎的な *nix バックアップとリストア手続きについて説明します。%0a%0a!! Introduction%0a%0aYour wiki installation contains some unique data in the following directories:%0a%0aあなたの wiki installation は、いくつかの(あなた)独自のデータを以下のディレクトリに保持しています:%0a%0a local/ Local configuration scripts%0a cookbook/ Recipes obtained from the [[(Cookbook:)Cookbook]]%0a pub/ Publicly accessible files%0a wiki.d/ Wiki pages%0a uploads/ Uploaded files (attachments)%0a%0a local/ Local configuration scripts%0a cookbook/ [[(Cookbook:)Cookbook]] から手に入れたレシピ%0a pub/ 共通にアクセス可能なファイル(訳注:skins もここ)%0a wiki.d/ Wiki ページ%0a uploads/ アップロードされたファイル (attachments)%0a%0a%0aA good backup plan will include periodically archiving these directories — or at bare minimum [@local/@] and [@wiki.d/@]. Good practice dictates keeping your backup archives on a separate machine.%0a%0aよいバックアップ計画は定期的にこれらのディレクトリー―あるいは最低限 [@local/@] と [@wiki.d/@] をアーカイブに保管することを含むでしょう。あなたのバックアップ・アーカイブを別の機械上で維持して書き取らせるのは良い習慣です。%0a%0a!! Simple Backup and Restore (*nix)%0a%0aWhen it comes to backup, simpler is better. Since the pmwiki distribution is very small (about 1/4 megabyte), it's simplest to just archive the distribution files along with the data.%0a%0aバックアップとなれば、シンプルな方が良いでしょう。pmwiki 配布は、とても小さい(およそ 1/4メガバイト)ので、データと共に配布ファイルを単にアーカイブに保管することは最も単純です。%0a%0a!!! Making a Backup Archive%0a%0aThe following *nix command, executed from the parent directory of your wiki's directory, will put a complete backup archive of your site in your home directory.%0a%0aあなたの wiki ディレクトリの親ディレクトリから実行される以下の *nix コマンドは、あなたの(wiki)サイトの完全なバックアップをあなたのホームディレクトリに出力するでしょう。%0a%0a-> [@%0atar -zcvf ~/wiki-backup-`date +%25Y%25m`.tar.gz wiki/%0a@]%0a%0a!!! Restoring the Backup Archive%0a%0a!!!! Simple Method%0a%0aYour site can be restored and running in under 30 seconds with%0a%0a-> [@%0atar -zxvf ~/wiki-backup-200512.tar.gz%0afind wiki/uploads/ -type d |xargs chmod 777%0afind wiki/wiki.d/ -type d |xargs chmod 777%0a@]%0a%0a!!!! A Slightly-More-Secure Method もうちょっと安全(Secure)な方法%0a(訳注:これでは、肝心のデータがリストアされないと思えるが...謎)%0a%0aThe simple restore commands above will give you world-writable files and directories. You can avoid world-writable permissions by letting PmWiki create directories with the proper attributes (ownership and permissions) for you.%0a%0a上記の簡単なリストアコマンドは誰でも書き込み可能なファイルとディレクトリをあなたに与えます。適切な属性(所有権と許可)を備えたディレクトリを PmWiki に作成させることにより、誰でも書き込み可能な許可(permissions)を回避することができます。%0a%0aStart with%0a%0a-> [@%0atar -zxvf ~/wiki-backup-200512.tar.gz%0arm -rf wiki/wiki.d%0arm -rf uploads%0achmod 2777 wiki/%0a@]%0a%0aNow upload a file in each group that had uploads. If your site doesn't have uploads, just visit your site once so the wiki.d/ directory will be created.%0a%0a今度は、uploads を持っていた各グループでファイルをアップロードしてください。 あなたのサイトに uploads がないなら、wiki.d/ディレクトリが作成されるために一度ただそちらのサイトを見てください。%0a%0aFinish your installation with%0a%0a-> [@%0achmod 755 wiki/%0atar -zxvf ~/wiki-backup-200512.tar.gz%0a@]%0a%0a%0a!!! Details%0a%0aThe commands on this page assume your site is in a directory called "wiki/". The test backup was made in December, 2005 so it's named accordingly.%0a%0aこのページのコマンドは、あなたのサイトが "wiki/" と呼ばれるディレクトリにあると仮定しています。テスト・バックアップは、それらしく名前を付けられるように、2005年12月に作られました。%0a%0aYour site will only have an uploads/ directory if uploads are enabled.%0a%0aあなたのサイトには、アップロードが可能にされる場合にだけ、 uploads/ ディレクトリがあるでしょう。%0a%0aThe backup command uses a date stamp (YYYYMM) in the filename. If you automate the command via cron you'll wind up with monthly snapshots of your site. You can get a daily snapshot by appending %25d to the date command (`date +%25Y%25m%25d` will get you YYYYMMDD). Be wary of space limitations if you have a large uploads/ directory.%0a%0aバックアップコマンドは、ファイル名の中に日付スタンプを使っています。cronによってコマンドを自動化すれば、サイトの毎月のスナップショットで締めくくるでしょう。date コマンドに %25d を追加すれば、日毎のスナップショットを撮れます (`date +%25Y%25m%25d` will get you YYYYMMDD)。大きい uploads/ ディレクトリがある場合は、スペース制限は用心してください。%0a%0a%0a!! See Also%0a%0a* A [[http://thread.gmane.org/gmane.comp.web.wiki.pmwiki.user/20317| thread]] [gmane.org] on the pmwiki-users mailing list.%0a* A [[(Cookbook:)BackupPages]] recipe in the cookbook.%0a%0a%25trail%25%3c%3c|[[ドキュメント目次]]|>> time=1137222644