Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P10
import_dump.pp
Active
Public
Actions
Authored by
•
Gilles
on Oct 13 2014, 8:28 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F259: import_dump.pp
Oct 13 2014, 8:28 PM
2014-10-13 20:28:05 (UTC+0)
Subscribers
Liuxinyu970226
# == Define: mediawiki::import_dump
#
# Imports an xml dump into the wiki.
#
# === Parameters
# [*xml_dump*]
# Fully qualified path to a dump file to import.
#
# [*dump_sentinel_page*]
# Name of unique page in the wiki created by the dump. As long as this page
# is not present in the wiki we will keep trying the import.
#
# [*db_name*]
# Wiki database to import page into. The default will import into the
# primary wiki.
#
# [*wiki*]
# Wiki to import page into. The default will import into the primary wiki.
#
# == Usage
#
# mediawiki::import_dump { 'labs_privacy':
# xml_dump => '/vagrant/labs_privacy_policy.xml',
# dump_sentinel_page => 'Testwiki:Privacy_policy',
# }
#
define
mediawiki
::
import_dump
(
$xml_dump,
$dump_sentinel_page,
$db_name
=
$::mediawiki::db_name,
$wiki
=
$::mediawiki::wiki_name,
)
{
require
::
mediawiki
require
::
role
::
parserfunctions
require
::
role
::
wikimediamessages
require
::
role
::
scribunto
exec
{
"import_dump_${title}"
:
command
=>
"mwscript phpinfo.php > /tmp/phpinfo && /bin/sleep 10 && mwscript phpinfo.php > /tmp/phpinfo2 && mwscript importDump.php --wiki=${db_name} ${xml_dump}"
,
unless
=>
"mwscript pageExists.php --wiki=${db_name} ${dump_sentinel_page}"
,
user
=>
'www-data'
,
require
=>
[
Mediawiki
::
Wiki
[
$wiki],
Package
[
'php-luasandbox'
],
Package
[
'hhvm-luasandbox'
],
],
}
}
Event Timeline
•
Gilles
edited the content of this paste.
(Show Details)
Oct 13 2014, 8:28 PM
2014-10-13 20:28:05 (UTC+0)
•
Gilles
changed the title of this paste from untitled to
import_dump.pp
.
•
Gilles
updated the paste's language from
autodetect
to
puppet
.
valhallasw
mentioned this in
T651: wikibugs should handle non-task event types
.
Oct 13 2014, 8:34 PM
2014-10-13 20:34:44 (UTC+0)
SJu
mentioned this in
T85257: Properties linking to Commons pages are not updated automatically when the page is moved
.
Dec 24 2014, 12:27 AM
2014-12-24 00:27:55 (UTC+0)
Liuxinyu970226
subscribed.
Feb 27 2015, 3:09 AM
2015-02-27 03:09:47 (UTC+0)
Liuxinyu970226
unsubscribed.
Mar 15 2015, 12:20 AM
2015-03-15 00:20:12 (UTC+0)
WickieTheViking
mentioned this in
T123398: Test Datatype formula with different browsers
.
Jan 26 2016, 3:18 PM
2016-01-26 15:18:05 (UTC+0)
Liuxinyu970226
subscribed.
Dec 29 2016, 2:29 AM
2016-12-29 02:29:06 (UTC+0)
Bugreporter
mentioned this in
T158108: Incorrect display of Special:ListProperties (regression)
.
Feb 14 2017, 8:00 PM
2017-02-14 20:00:37 (UTC+0)
scblr
mentioned this in
T244862: App crashes when editing article descriptions on Huawei P10 Lite in Hebrew (Android 8)
.
Feb 11 2020, 2:02 PM
2020-02-11 14:02:23 (UTC+0)
Physikerwelt
mentioned this in
T255937: Enable Phan for MW:MathSearch
.
Jun 21 2020, 10:34 AM
2020-06-21 10:34:25 (UTC+0)
YacineBoussoufa
mentioned this in
T271218: "No recently viewed articles" image not fit landscape orientation
.
Jan 5 2021, 8:49 PM
2021-01-05 20:49:07 (UTC+0)
Katswiri
mentioned this in
T311706: Android app: problems entering reasons for undo actions
.
Jun 30 2022, 11:52 AM
2022-06-30 11:52:42 (UTC+0)
Log In to Comment