Skip to content

Commit

Permalink
Merge pull request #165 from MaRDI4NFDI/fix_lua_and_xml_backup
Browse files Browse the repository at this point in the history
Fix lua and xml backup
  • Loading branch information
eloiferrer authored Oct 22, 2024
2 parents 3cacf2f + 747b3b2 commit d8e0598
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ FROM mediawiki:${MEDIAWIKI_VERSION}
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive\
apt-get install --yes --no-install-recommends \
nano jq=1.* libbz2-dev=1.* gettext-base npm grunt cron vim librsvg2-bin libpq-dev libyaml-dev && \
nano jq=1.* libbz2-dev=1.* gettext-base npm grunt cron vim librsvg2-bin libpq-dev libyaml-dev \
lua5.1 liblua5.1-0-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN a2enmod rewrite
Expand Down
5 changes: 4 additions & 1 deletion backup/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ xml_dump() {
echo
echo "XML backup"
XML_DUMP_FILE=portal_xml_backup_${DATE_STRING}.gz
# Relevant namespaces: https://portal.mardi4nfdi.de/wiki/Special:NamespaceInfo
NAMESPACES=(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 120 121 122 123 274 275 640 641 828 829 3000)
NAMESPACE_STR=$(IFS=,; echo "${NAMESPACES[*]}")
# parsoid requires script to be executed from mw root
cd /var/www/html/ || return 255
if /usr/local/bin/php /var/www/html/maintenance/dumpBackup.php --current --output=gzip:"${BACKUP_DIR}/${XML_DUMP_FILE}" --quiet --conf /shared/LocalSettings.php
if /usr/local/bin/php /var/www/html/maintenance/dumpBackup.php --current --output=gzip:"${BACKUP_DIR}/${XML_DUMP_FILE}" --quiet --filter=namespace:$NAMESPACE_STR --conf /shared/LocalSettings.php
then
STATUS=$?
if [[ -f ${BACKUP_DIR}/${XML_DUMP_FILE} ]]; then
Expand Down

0 comments on commit d8e0598

Please sign in to comment.