Manual:DumpUploads.php/pt-br

Versão MediaWiki:
1.8
Category:MediaWiki code/pt-br#DumpUploads.php

Detalhes

dumpUploads.php file is a 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.

Options/Arguments

Opção/Parâmetro Descrição Required?
--baseSet base relative path instead of wiki include rootOptional
--localList all local files, used or not. No shared files includedOptional
--sharedInclude images used from shared repositoryOptional
--usedSkip local images that are not usedOptional

Uso

This generates list of uploaded files which can be fed to tar or similar. By default, outputs relative paths against the parent directory of $wgUploadDirectory.

php maintenance/run.php dumpUploads [ --base| --local| --shared| --used ]
No MediaWiki versão 1.39.12 e anteriores, você deve invocar os scripts de manutenção usando php maintenance/scriptName.php em vez de php maintenance/run.php scriptName.

Generate a list of uploaded files:

Terminal

Save all uploaded files to a tar file:

Terminal
Atenção Atenção: You should nearly never use xargs with tar -c. Doing so runs the risk that xargs will run a second time with the same initial arguments, creating an archive that contains only the last few files that were intended. In the strict POSIX world, there is no good solution to this -- use cpio instead. With GNU tar (ie, Linux, FreeBSD), either use the T argument as above, or the A argument with xargs.

Untaring or extracting to a directory:

Terminal

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

Ver também

Category:Maintenance scripts/pt-br#dumpUploads.php Category:Bulk upload/pt-br Category:File maintenance scripts/pt-br
Category:Bulk upload/pt-br Category:File maintenance scripts/pt-br Category:Maintenance scripts/pt-br Category:MediaWiki code/pt-br