Manual:dumpUploads.php

From mediawiki.org
This page is a translated version of the page Manual:DumpUploads.php and the translation is 100% complete.
MediaWiki バージョン:
1.8

詳細

dumpUploads.php は wiki にアップロードされたすべてのファイルのリストを出力するメンテナンススクリプトです。 wiki にアップロードされたすべてのファイルのバックアップを作成するために使用できます。

オプション/引数

オプション 説明 必須かどうか
--base wikiのルートディレクトリからの相対パスではなく、指定したディレクトリからの相対パスを表示する 省略可能
--local 使用されているかどうかに関わらずすべてのファイルを出力します。共有ファイルは含まれません。 省略可能
--shared 共有リポジトリからのファイルを含めます 省略可能
--used 使用されていないローカルファイルを含めません 省略可能

使用法

tarなどでアーカイブするためのアップロードファイルリストが作成されます。既定では、出力されるパスは $wgUploadDirectory の親ディレクトリからの相対パスです。

php maintenance/dumpUploads.php [ --base| --local| --shared| --used ]

アップロードファイルのリストを作成するには

Terminal

アップロードファイルをすべてtarで保存するには

Terminal
警告 警告: You should nearly never use xargs with tar -c. Doing so runs the risk that xargs will run a second time with the same initial arguments, creating an archive that contains only the last few files that were intended. In the strict POSIX world, there is no good solution to this -- use cpio instead. With GNU tar (ie, Linux, FreeBSD), either use the T argument as above, or the A argument with xargs.

解凍して取り出すには

Terminal

これらのファイルは importImages.php メンテナンススクリプトを使用して別のwikiにインポートできます。

関連項目