Jump to content

Manual:migrateFileRepoLayout.php

From mediawiki.org

Details

[edit]

migrateFileRepoLayout.php is a maintenance script that copies all files in FileRepo to a new layout using SHA1 paths.

Options

[edit]
Option Description Required
--oldlayout Old layout; one of 'name' or 'sha1' Required
--newlayout New layout; one of 'name' or 'sha1' Required
--since Copy only files from after this timestamp Optional

This script runs in batches of 50.

Usage

[edit]
php maintenance/run.php migrateFileRepoLayout --oldlayout name|sha1 --newlayout  name|sha1 [ --since ]
Terminal
In MediaWiki version 1.39.10 and earlier, you must invoke maintenance scripts using php maintenance/scriptName.php instead of php maintenance/run.php scriptName.

Common error

[edit]
Invalid old layout.

The value for parameter --oldlayout must be either name or sha1.

Invalid new layout.

The value for parameter --newlayout must be either name or sha1.

See also

[edit]