MediaWiki master
|
Copy all files in one container of one backend to another. More...
Inherits Maintenance.
Public Member Functions | |
__construct () | |
execute () | |
Protected Member Functions | |
copyFileBatch (array $srcPathsRel, $backendRel, FileBackend $src, FileBackend $dst) | |
delFileBatch (array $dstPathsRel, $backendRel, FileBackend $dst) | |
filesAreSame (FileBackend $src, FileBackend $dst, $sPath, $dPath) | |
getListingDiffRel (FileBackend $src, FileBackend $dst, $backendRel) | |
Protected Attributes | |
array null | $statCache = null |
(path sha1 => stat) Pre-computed dst stat entries from listings | |
Copy all files in one container of one backend to another.
This can also be used to re-shard the files for one backend using the config of second backend. The second backend should have the same config as the first, except for it having a different name and different sharding configuration. The backend should be made read-only while this runs. After this script finishes, the old files in the containers can be deleted.
Definition at line 41 of file copyFileBackend.php.
CopyFileBackend::__construct | ( | ) |
Definition at line 45 of file copyFileBackend.php.
|
protected |
string[] | $srcPathsRel | |
string | $backendRel | |
FileBackend | $src | |
FileBackend | $dst |
Definition at line 212 of file copyFileBackend.php.
References Wikimedia\FileBackend\FileBackend\clearCache(), Wikimedia\FileBackend\FileBackend\doQuickOperations(), Wikimedia\FileBackend\FileBackend\fileExists(), filesAreSame(), Wikimedia\FileBackend\FileBackend\getDomainId(), Wikimedia\FileBackend\FileBackend\getLocalReference(), Wikimedia\FileBackend\FileBackend\getLocalReferenceMulti(), Wikimedia\FileBackend\FileBackend\getRootStoragePath(), and Wikimedia\FileBackend\FileBackend\prepare().
Referenced by execute().
|
protected |
string[] | $dstPathsRel | |
string | $backendRel | |
FileBackend | $dst |
Definition at line 299 of file copyFileBackend.php.
References Wikimedia\FileBackend\FileBackend\doQuickOperations(), Wikimedia\FileBackend\FileBackend\getDomainId(), and Wikimedia\FileBackend\FileBackend\getRootStoragePath().
Referenced by execute().
CopyFileBackend::execute | ( | ) |
Definition at line 61 of file copyFileBackend.php.
References $path, copyFileBatch(), delFileBatch(), and getListingDiffRel().
|
protected |
FileBackend | $src | |
FileBackend | $dst | |
string | $sPath | |
string | $dPath |
Definition at line 337 of file copyFileBackend.php.
References Wikimedia\FileBackend\FileBackend\getFileSha1Base36(), and Wikimedia\FileBackend\FileBackend\getFileStat().
Referenced by copyFileBatch().
|
protected |
FileBackend | $src | |
FileBackend | $dst | |
string | $backendRel |
Definition at line 176 of file copyFileBackend.php.
References Wikimedia\FileBackend\FileBackend\getFileList(), and Wikimedia\FileBackend\FileBackend\getRootStoragePath().
Referenced by execute().
|
protected |
(path sha1 => stat) Pre-computed dst stat entries from listings
Definition at line 43 of file copyFileBackend.php.