Manual:DumpUploads.php

dumpUploads.php is a 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: php maintenance/dumpUploads.php

Save all uploaded files to a tar file: php maintenance/dumpUploads.php | xargs tar cf backup_files.tar

This collection can then be imported into another wiki using the importImages.php maintenance script.

Arguments
A list of available commands can be found inside dumpUploads.php: Generates list of uploaded files which can be fed to tar or similar. By default, outputs relative paths against the parent directory of $wgUploadDirectory.

Usage: php dumpUploads.php [--base|--conf|--dbpass|--dbuser|--globals|--help|--local|--memory-limit|--quiet|--server|--shared|--used|--wiki]

Generic maintenance parameters: --help (-h): Display this help message --quiet (-q): Whether to supress non-error output --conf: Location of LocalSettings.php, if not default --wiki: For specifying the wiki ID   --globals: Output globals at the end of processing for debugging --memory-limit: Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it   --server: The protocol and server name to use in URLs, e.g.        http://en.wikipedia.org. This is sometimes necessary because server name detection may fail in command line scripts.

Script dependant parameters: --dbuser: The DB user to use for this script --dbpass: The password to use for this script

Script specific parameters: --base: Set base relative path instead of wiki include root --local: List all local files, used or not. No shared files included --shared: Include images used from shared repository --used: Skip local images that are not used