Manual:copyFileBackend.php

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Details

copyFileBackend.php file is a maintenance script to copy all files in some containers of one backend to another.

Options

Option Description Required
--src Backend containing the source files <translate> Required</translate>
--dst Backend where files should be copied to <translate> Required</translate>
--containers Pipe separated list of containers <translate> Required</translate>
--subdir Only do items in this child directory <translate> Optional</translate>
--ratefile File to check periodically for batch size <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>

Usage

php maintenance/copyFileBackend.php --src sourceBackend --dst destinationBackend --containers containers [ --subdir| --ratefile| --prestat| --skiphash| --missingonly| --syncviadelete| --utf8only ]
Terminal
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.

See also