Controlled Document:Installation Guide/Advanced/Maintenance scripts/dumpPDF: Difference between revisions

WikiSysop (talk | contribs)
Created page with "== Extension == BlueSpice Extension: PDFCreator == Usage == This script allows to export the wiki pages '''from all content namespaces''' to PDF. To run the script, execute:<syntaxhighlight lang="php"> php extensions/PDFCreator/maintenance/DumpNamespaces.php --user=WikiSysop --dest=cache/ --limit=100 </syntaxhighlight> === Required parameters === * <code>--user</code>: Username for the export context * <code>--dest</code>: Absolute path of th..."
 
(No difference)

Latest revision as of 10:16, 8 October 2026

Extension

BlueSpice Extension: PDFCreator

Usage

This script allows to export the wiki pages from all content namespaces to PDF.

To run the script, execute:

php extensions/PDFCreator/maintenance/DumpNamespaces.php --user=WikiSysop --dest=cache/ --limit=100

Required parameters

  • --user: Username for the export context
  • --dest: Absolute path of the output pdf file

Optional parameters

  • --limit: Limit the number of wiki pages for each pdf. If the limit is exceeded, the namespace will be split into pdfs depending on the first character of the page name. If the parameter --limit is not set, all pages of a namespace will be exported to one pdf file.
  • --template: PDF template name
  • --mail-recipient: E-mail address for a notification email.
  • --mail-subject : E-mail subject for a notification email.
  • --verbose: Runs the script in verbose mode.
php extensions/PDFCreator/maintenance/DumpNamespaces.php --user=WikiSysop --dest=cache/ --limit=100 --template=MyTemplate --mail-recipient=me@my-server.test --mail-subject="Namespace dump for wiki test"

Backup BlueSpice farm instances

To backup farm instance wiki pages, run (replace the name of the instances FARM1 etc.):

#!/bin/bash

InstancesList=('FARM1' 'FARM2' 'FARM3' 'FARM5')
ScriptPath=/app/bluespice/w/extensions/PDFCreator/maintenance/DumpNamespaces.php
TIMESTAMP=date +_%Y-%m-%d_%H
FilePath='/data/bluespice/cache/pdf_dump'$TIMESTAMP

mkdir -pv $FilePath

for instance in ${InstancesList[@]}; do
php ${ScriptPath} --memory-limit max --user WikiSysop --verbose --sfr $instance --dest $FilePath/$instance
done