From c25c490677bcba2c2e9fee90db10594bd43f6982 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 5 Nov 2018 23:18:54 +0100 Subject: Importing Bitraf's mediawiki o Some improvements, reusing old backup scripts. --- ansible/roles/mw-backend/files/bin/mw-dump-backup | 9 --------- ansible/roles/mw-backend/files/bin/mw-dump-db | 12 ------------ ansible/roles/mw-backend/files/bin/mw-make-backup | 5 ----- 3 files changed, 26 deletions(-) delete mode 100644 ansible/roles/mw-backend/files/bin/mw-dump-backup delete mode 100644 ansible/roles/mw-backend/files/bin/mw-dump-db delete mode 100644 ansible/roles/mw-backend/files/bin/mw-make-backup (limited to 'ansible/roles/mw-backend/files/bin') diff --git a/ansible/roles/mw-backend/files/bin/mw-dump-backup b/ansible/roles/mw-backend/files/bin/mw-dump-backup deleted file mode 100644 index 0e21eb2..0000000 --- a/ansible/roles/mw-backend/files/bin/mw-dump-backup +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -exec php /usr/share/mediawiki/maintenance/dumpBackup.php \ - --full \ - --include-files \ - --uploads \ - > /opt/mediawiki/backup/content-dump.xml diff --git a/ansible/roles/mw-backend/files/bin/mw-dump-db b/ansible/roles/mw-backend/files/bin/mw-dump-db deleted file mode 100644 index 5a6699a..0000000 --- a/ansible/roles/mw-backend/files/bin/mw-dump-db +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -export PGHOST=$(sed -n 's,^.wgDBserver.*"\([^"]*\)".*,\1,p' /etc/mediawiki/LocalSettings.php) -export PGUDATABASE=$(sed -n 's,^.wgDBname.*"\([^"]*\)".*,\1,p' /etc/mediawiki/LocalSettings.php) -export PGUSER=$(sed -n 's,^.wgDBuser.*"\([^"]*\)".*,\1,p' /etc/mediawiki/LocalSettings.php) -export PGPASSWORD=$(sed -n 's,^.wgDBpassword.*"\([^"]*\)".*,\1,p' /etc/mediawiki/LocalSettings.php) -export PGPORT=$(sed -n 's,^.wgDBport.*"\([^"]*\)".*,\1,p' /etc/mediawiki/LocalSettings.php) - -rm -rf /opt/mediawiki/backup/db -exec pg_dump -b --format directory -f /opt/mediawiki/backup/db diff --git a/ansible/roles/mw-backend/files/bin/mw-make-backup b/ansible/roles/mw-backend/files/bin/mw-make-backup deleted file mode 100644 index e99b909..0000000 --- a/ansible/roles/mw-backend/files/bin/mw-make-backup +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -exec borg create /opt/mediawiki/borg::mediawiki-{now:%Y%m%d-%H%M%S} /opt/mediawiki/backup -- cgit v1.2.3