Manual:copyFileBackend.php
From Linux Web Expert
MediaWiki ファイル: copyFileBackend.php | |
---|---|
場所: | maintenance/ |
ソース コード: | master • 1.41.1 • 1.40.3 • 1.39.7 |
クラス: | CopyFileBackend |
詳細
copyFileBackend.php はコンテナ内のすべてのファイルを別のバックエンドにコピーする メンテナンススクリプト です。
オプション
オプション | 説明 | 必須かどうか |
---|---|---|
--src | コピー元のバックエンド | <translate> Required</translate> |
--dst | コピー先のバックエンド | <translate> Required</translate> |
--containers | パイプで区切られたコンテナのリスト | <translate> Required</translate> |
--subdir | 指定した子ディレクトリのみ | <translate> Optional</translate> |
--ratefile | バッチサイズを定期的にチェックするファイル | <translate> Optional</translate> |
--prestat | Stat the destination files first (try to use listings) | <translate> Optional</translate> |
--skiphash | Skip SHA-1 sync checks for files | <translate> Optional</translate> |
--missingonly | Only copy files missing from destination listing | <translate> Optional</translate> |
--syncviadelete | Delete destination files missing from source listing | <translate> Optional</translate> |
--utf8only | Skip source files that do not have valid UTF-8 names | <translate> Optional</translate> |
使用法
php maintenance/copyFileBackend.php --src sourceBackend --dst destinationBackend --containers containers [ --subdir| --ratefile| --prestat| --skiphash| --missingonly| --syncviadelete| --utf8only ]
Terminal
$ php maintenance/copyFileBackend.php --src local-backend --dst AmazonS3 --containers local-public Doing container 'local-public'... Copying file(s)... Already have thumb/8/8a/1631330937964.jpeg/1600px-1631330937964.jpeg. Already have thumb/8/8a/1631330937964.jpeg/800px-1631330937964.jpeg. Already have thumb/8/8a/1631330937964.jpeg/1200px-1631330937964.jpeg. Already have thumb/8/8a/1631330937964.jpeg/120px-1631330937964.jpeg. Already have thumb/5/53/Example_Main_Page.png/114px-Example_Main_Page.png. Already have 8/8a/1631330937964.jpeg. Already have README. Already have d/d4/Logo.jpg. Already have e/21/1631330937964.jpeg. Already have 5/53/Asdeer.jpeg. Already have 5/53/Example_Main_Page.png. Already have .htaccess. Copied 12 file(s). Finished container 'local-public'. Done.
To give more than one container, give them as separated by pipe (|) like local-public|local-deleted
Common errors
- No backend defined with the name '$name'.
This error occurs when the value of --src or --dst does not exist in Manual:$wgFileBackends . Check your --src or --dst parameter.