Manual:DumpUploads.php

Details
dumpUploads.php file is a maint-scripts>Special:MyLanguage/Manual:Maintenance scripts|maintenance script which dumps a list of files uploaded to a wiki. It can be used to create a backup of all uploaded files on the wiki.

Example
Generate a list of uploaded files:

Save all uploaded files to a tar file:

Copy to a temp directory, untar within that directory, and flatten sub-directories:

This collection of files can then be imported into another wiki using the  maintenance script.

Usage
A list of available commands can be found inside dumpUploads.php, it is a generated list of uploaded files which can be fed to tar or similar. By default, outputs relative paths against the parent directory of .