MediaWiki
REL1_20
|
Copy all files in one container of one backend to another. More...
Public Member Functions | |
__construct () | |
Default constructor. | |
execute () | |
Do the actual work. | |
Protected Member Functions | |
copyFileBatch (array $srcPathsRel, $backendRel, FileBackend $src, FileBackend $dst) | |
filesAreSame (FileBackend $src, FileBackend $dst, $sPath, $dPath) |
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.
Default constructor.
Children should call this *first* if implementing their own constructors
Reimplemented from Maintenance.
Definition at line 38 of file copyFileBackend.php.
References Maintenance\addOption(), and Maintenance\setBatchSize().
CopyFileBackend::copyFileBatch | ( | array $ | srcPathsRel, |
$ | backendRel, | ||
FileBackend $ | src, | ||
FileBackend $ | dst | ||
) | [protected] |
Definition at line 131 of file copyFileBackend.php.
References FileBackend\doQuickOperations(), Maintenance\error(), filesAreSame(), FileBackend\getLocalReference(), FileBackend\getRootStoragePath(), Maintenance\hasOption(), Maintenance\output(), and FileBackend\prepare().
Referenced by execute().
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Definition at line 52 of file copyFileBackend.php.
References $count, copyFileBatch(), Maintenance\error(), Maintenance\getOption(), Maintenance\hasOption(), Maintenance\output(), and FileBackendGroup\singleton().
CopyFileBackend::filesAreSame | ( | FileBackend $ | src, |
FileBackend $ | dst, | ||
$ | sPath, | ||
$ | dPath | ||
) | [protected] |
Definition at line 186 of file copyFileBackend.php.
References FileBackend\fileExists(), FileBackend\getFileSha1Base36(), FileBackend\getFileSize(), and Maintenance\hasOption().
Referenced by copyFileBatch().