This page is a translated version of the page Manual:CopyFileBackend.php and the translation is 38% complete.


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


オプション 説明 必須かどうか
--src Backend containing the source files 必須
--dst Backend where files should be copied to 必須
--containers Pipe separated list of containers 必須
--subdir Only do items in this child directory 省略可能
--ratefile File to check periodically for batch size 省略可能
--prestat Stat the destination files first (try to use listings) 省略可能
--skiphash Skip SHA-1 sync checks for files 省略可能
--missingonly Only copy files missing from destination listing 省略可能
--syncviadelete Delete destination files missing from source listing 省略可能
--utf8only Skip source files that do not have valid UTF-8 names 省略可能


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

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.