|
|
Line 1: |
Line 1: |
| {{DISPLAYTITLE:extensions/ContentTransfer/maintenance/executeTransfer.php}} | | {{#subpages:|showname=no}} |
| [[Setup:Installation_Guide/Advanced/Maintenance_scripts|{{Icon|bi bi-arrow-right-circle|||}} all maintenance scripts]]
| |
| == Reference ==
| |
| BlueSpice Extension: [[Reference:ContentTransfer]]
| |
| | |
| == Usage ==
| |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php --category=GlobalPage --targets=Target1,Target2,Target3</code>
| |
| There 3 ways to specify pages to transfer:
| |
| | |
| * <code>--category</code> (as it is done above),
| |
| * <code>--namespace</code> (similar with <code>--category</code>) and
| |
| * <code>--pages</code><span>.</span> <code>--pages</code> option let you explicitly specify pages needed to transfer:
| |
| | |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php --pages=Page1,Demo:Page2,Page3 --targets=Target1,Target2,Target3</code>
| |
| | |
| == Configuration ==
| |
| Maintenance script can consume JSON file with necessary configuration. Sample JSON file is located by this path: <code>extensions/ContentTransfer/docs/transfer-config.json.example</code>. This file can be used to create JSON configuration file somewhere to not type all options in CLI each time.
| |
| | |
| For that, <code>--json-config</code> option can be used. There can be specified path to the file with JSON configuration.
| |
| | |
| If you need to create your own JSON configuration file, copy sample JSON file somewhere and edit it to set necessary configuration.
| |
| | |
| For example, you have file <code>/home/some_user/config/transfer-config.json</code>. Then it can be used like that:
| |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php --json-config=/home/some_user/config/transfer-config.json</code>
| |
| You can specify either absolute file path from the root or relative path from present working directory.
| |
| | |
| | |
| '''Note!'''
| |
| | |
| It is also possible to use JSON file and additionally pass options from CLI. In that case options from CLI will have greater priority and '''will override''' same options from JSON file.
| |
| | |
| Example:
| |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php --json-config=/home/some_user/config/transfer-config.json --pages=Page1,Demo:Page2,Page3 --targets=Target1,Target2,Target3</code>
| |
| Here script will read configuration from the JSON file specified, but '''“pages”''' and '''“targets”''' options '''will be overridden''' from CLI (if they are presented in JSON).
| |
| | |
| Same with other options.
| |
| | |
| == Options ==
| |
| | |
| * <code>--user</code>Context user of "sending" wiki who will be used to transfer wiki pages. Actually it\'s just about recording transfer in DB. Default: '''“MediaWiki default”'''
| |
| * <code>--only-modified</code>If page should be transferred only if it was modified since last transfer. '''It's just a flag, it can be passed or not.'''
| |
| * <code>--modified-since</code>Transfer page only if was modified since specified date. Date must be specified in format '''"DD.MM.YYYY"'''. Default: '''“”'''
| |
| * <code>--include-related</code>If all related wiki pages should also be transferred. Like templates, files, links which are used on transferring page. '''It's just a flag, it can be passed or not.'''
| |
| * <code>--force</code>Transfer page if it is protected on receiving wiki. '''It's just a flag, it can be passed or not.'''
| |
| | |
| Also there is <code>--dry</code> option (it's a flag too), which may be useful if user just wants to take a look at transferring titles, but without actual changes in “receiving” wikis.
| |
| | |
| | |
| Complete list of possible options with descriptions can be got by such command:
| |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php --help</code>
| |
| | |
| | |
| If there is a need to set specific user for creating pages in target wiki (in case with multiple available for that users), it can be done by that way:
| |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php ... --targets=Target1=User1,Target2=User2,Target3...</code>
| |