Handbuch:FindOrphanedFiles.php

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

Details

findOrphanedFiles.php ist ein Wartungsskript, das nicht erfasste Dateien in der "öffentlichen" Repo-Zone findet.

MediaWiki uses the directory defined by $wgUploadDirectory ("images/" by default) to store uploaded files. This script finds files that exist in the upload directory but that are not registered in the database.

Optionen

Option Beschreibung Notwendig
--subdir Only scan files in this subdirectory (for example: "a/a0") Optional
--verbose Mention file paths checked Optional

Verwendung

php maintenance/run.php findOrphanedFiles [ --verbose| --subdir ]
In MediaWiki version 1.39.10 and earlier, you must invoke maintenance scripts using php maintenance/scriptName.php instead of php maintenance/run.php scriptName.

Basic run

Basic run with verbose

Terminal

Häufiger Fehler

Local repo uses SHA-1 file storage names; aborting.

This script does not work if your local storage uses SHA-1 hashing.

Could not get file listing.

This error occurs when the directory does not exist or the user running the script does not have permission to read the directory.

If directory does exist, check the file permissions. If you are a root user, you can run script with sudo.

Siehe auch