(Created page with "{{DISPLAYTITLE:extensions/ContentTransfer/maintenance/executeTransfer.php}} Setup:Installation_Guide/Advanced/Maintenance_scripts|{{Icon|bi bi-arrow-right-circle|||}} all ma...") Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
Line 2: | Line 2: | ||
[[Setup:Installation_Guide/Advanced/Maintenance_scripts|{{Icon|bi bi-arrow-right-circle|||}} all maintenance scripts]] | [[Setup:Installation_Guide/Advanced/Maintenance_scripts|{{Icon|bi bi-arrow-right-circle|||}} all maintenance scripts]] | ||
== Reference == | == Reference == | ||
BlueSpice Extension: [[Reference:ContentTransfer]] | BlueSpice Extension: [[Reference:ContentTransfer|ContentTransfer]] | ||
== Usage == | == Usage == |
Revision as of 11:20, 19 April 2023
Reference
BlueSpice Extension: ContentTransfer
Usage
php extensions/ContentTransfer/maintenance/executeTransfer.php --category=GlobalPage --targets=Target1,Target2,Target3
There 3 ways to specify pages to transfer:
--category
(as it is done above),--namespace
(similar with--category
) and--pages
.--pages
option let you explicitly specify pages needed to transfer:
php extensions/ContentTransfer/maintenance/executeTransfer.php --pages=Page1,Demo:Page2,Page3 --targets=Target1,Target2,Target3
Configuration
Maintenance script can consume JSON file with necessary configuration. Sample JSON file is located by this path: extensions/ContentTransfer/docs/transfer-config.json.example
. This file can be used to create JSON configuration file somewhere to not type all options in CLI each time.
For that, --json-config
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 /home/some_user/config/transfer-config.json
. Then it can be used like that:
php extensions/ContentTransfer/maintenance/executeTransfer.php --json-config=/home/some_user/config/transfer-config.json
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:
php extensions/ContentTransfer/maintenance/executeTransfer.php --json-config=/home/some_user/config/transfer-config.json --pages=Page1,Demo:Page2,Page3 --targets=Target1,Target2,Target3
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
--user
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”--only-modified
If page should be transferred only if it was modified since last transfer. It's just a flag, it can be passed or not.--modified-since
Transfer page only if was modified since specified date. Date must be specified in format "DD.MM.YYYY". Default: “”--include-related
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.--force
Transfer page if it is protected on receiving wiki. It's just a flag, it can be passed or not.
Also there is --dry
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:
php extensions/ContentTransfer/maintenance/executeTransfer.php --help
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:
php extensions/ContentTransfer/maintenance/executeTransfer.php ... --targets=Target1=User1,Target2=User2,Target3...