MediaWiki
REL1_22
|
Copy all files in one container of one backend to another. More...
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 | |
$statCache = array() |
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 37 of file copyFileBackend.php.
Reimplemented from Maintenance.
Definition at line 40 of file copyFileBackend.php.
References Maintenance\addOption(), and Maintenance\setBatchSize().
CopyFileBackend::copyFileBatch | ( | array $ | srcPathsRel, |
$ | backendRel, | ||
FileBackend $ | src, | ||
FileBackend $ | dst | ||
) | [protected] |
array | $srcPathsRel | |
string | $backendRel | |
FileBackend | $src | |
FileBackend | $dst |
Definition at line 212 of file copyFileBackend.php.
References array(), as, FileBackend\clearCache(), FileBackend\doQuickOperations(), Maintenance\error(), false, FileBackend\fileExists(), filesAreSame(), FileBackend\getLocalReference(), FileBackend\getLocalReferenceMulti(), FileBackend\getRootStoragePath(), FileBackend\getWikiId(), Maintenance\hasOption(), Maintenance\output(), FileBackend\prepare(), and true.
Referenced by execute().
CopyFileBackend::delFileBatch | ( | array $ | dstPathsRel, |
$ | backendRel, | ||
FileBackend $ | dst | ||
) | [protected] |
array | $dstPathsRel | |
string | $backendRel | |
FileBackend | $dst |
Definition at line 299 of file copyFileBackend.php.
References array(), as, FileBackend\doQuickOperations(), Maintenance\error(), FileBackend\getRootStoragePath(), FileBackend\getWikiId(), Maintenance\output(), and true.
Referenced by execute().
Reimplemented from Maintenance.
Definition at line 56 of file copyFileBackend.php.
References $count, $path, array(), as, copyFileBatch(), delFileBatch(), Maintenance\error(), getListingDiffRel(), Maintenance\getOption(), Maintenance\hasOption(), Maintenance\output(), and FileBackendGroup\singleton().
CopyFileBackend::filesAreSame | ( | FileBackend $ | src, |
FileBackend $ | dst, | ||
$ | sPath, | ||
$ | dPath | ||
) | [protected] |
FileBackend | $src | |
FileBackend | $dst | |
string | $sPath | |
string | $dPath |
Definition at line 337 of file copyFileBackend.php.
References array(), FileBackend\getFileSha1Base36(), FileBackend\getFileStat(), and Maintenance\hasOption().
Referenced by copyFileBatch().
CopyFileBackend::getListingDiffRel | ( | FileBackend $ | src, |
FileBackend $ | dst, | ||
$ | backendRel | ||
) | [protected] |
FileBackend | $src | |
FileBackend | $dst | |
string | $backendRel |
Definition at line 176 of file copyFileBackend.php.
References array(), as, Maintenance\error(), FileBackend\getFileList(), and FileBackend\getRootStoragePath().
Referenced by execute().
CopyFileBackend::$statCache = array() [protected] |
Definition at line 38 of file copyFileBackend.php.